[PATCH, libgomp]: Cleanup test files in testsuite/libgomp.c directory
Uros Bizjak
ubizjak@gmail.com
Sat Mar 17 17:36:00 GMT 2007
Hello!
The motivation for this cleanup was a failure in libgomp.c/ordered-2.c
for x86_64 target with -m32. The problem was, that i386-*-* targets
compiled test cases with -march=i486, but this compile flag was missing
when test cases were compiled for x86_64-*-* with -m32. This was leading
to link errors with undefined reference to `__sync_fetch_and_add_4' for
libgomp.c/ordered-2.c
Attached patch fixes this by checking current_target_name for "/-m32"
string for x86_64-*-* targets and by setting ALWAYS_CFLAGS to
-march=i486 if the pattern is found. This is consistent with libgomp's
configure.tgt.
Additionally, libgomp.c/atomic-2.c was changed to use new -mcx16 compile
flag instead of -march=nocona. By using this flag, we were able to get
rid of the check for SSE3, as CX16 cpuid flag is independent of SSE3 flag.
Some default dg-options were also removed from testcases and x86 target
specific dg-options in libgomp.c/atomic-1.c were simplified.
Otherwise fairly trivial patch was regression tested for libgomp on
x86_64 with and without -m32. The patch cures ordered-2.c test failure
for x86_64 -m32.
OK for mainline?
2007-03-17 Uros Bizjak <ubizjak@gmail.com>
* testsuite/lib/libgomp-dg.exp (libgomp_init): Set additional_flags
to -march=i486 for target x86_64-*-* when tested with -m32.
* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2.
* testsuite/libgomp.c/atomic-1.c: Set dg-options to
"-O2 -march=pentium" for ilp32 x86 targets. Simplify check for
CX8 flag.
* testsuite/libgomp.c/atomic-2.c: Set dg-options to "-O2 -mcx16" for
lp64 x86 targets. Do not check for SSE3 bit. Do not define bit_SSE3.
* testsuite/libgomp.c/pr29947-1.c: Remove default dg-options.
* testsuite/libgomp.c/pr29947-1.c: Ditto.
* testsuite/libgomp.c/atomic-10.c: Ditto.
Uros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: openmp-test.diff
Type: text/x-patch
Size: 3624 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070317/c2da6257/attachment.bin>
More information about the Gcc-patches
mailing list