diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-22 07:00:08 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-03-22 07:00:08 +0000 |
commit | a17d193ed9741b648785e456c52ea08557d40c6a (patch) | |
tree | e28cf23cafe55f19b81d3ceb6bbb675b5d939270 /libgomp/testsuite/libgomp.c | |
parent | 02f07e876bbbb086765d8dae9e509b082af46018 (diff) | |
download | gcc-a17d193ed9741b648785e456c52ea08557d40c6a.tar.gz |
* testsuite/config/default.exp: New file.
* testsuite/lib/libgomp.exp: New file.
* testsuite/lib/libgomp.dg (load_gcc_lib, libgomp_init,
libgomp_target_compile, libgomp_option_help, libgomp_option_proc,
load_lib *, load_gcc_lib *): Move to libgomp.exp.
(libgomp_load): Remove.
* testsuite/lib/libgomp.exp (libgomp_init): Compute
always_ld_library_path, not ld_library_path. Set additional_flags
to -march=i486 for ilp32 x86_64-*-* and i386-*-* targets.
(target_compile): Do not call libgomp_init. Append lang_library_path
and lang_link_flags to options.
* testsuite/libgomp.c/c.exp: Set DEFAULT_FLAGS to -O2. Set
ld_library_path from always_ld_library_path. Set LD_LIBRARY_PATH
here.
* testsuite/libgomp.c++/c++.exp: Set ld_library_path from
always_ld_library_path. Set LD_LIBRARY_PATH here.
* testsuite/libgomp.fortran/fortran.exp: Ditto.
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123125 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgomp/testsuite/libgomp.c')
-rw-r--r-- | libgomp/testsuite/libgomp.c/atomic-1.c | 6 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/atomic-10.c | 1 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/atomic-2.c | 7 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/c.exp | 5 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr29947-1.c | 2 | ||||
-rw-r--r-- | libgomp/testsuite/libgomp.c/pr29947-2.c | 2 |
6 files changed, 10 insertions, 13 deletions
diff --git a/libgomp/testsuite/libgomp.c/atomic-1.c b/libgomp/testsuite/libgomp.c/atomic-1.c index 82642a4e48d..dfbcf851c44 100644 --- a/libgomp/testsuite/libgomp.c/atomic-1.c +++ b/libgomp/testsuite/libgomp.c/atomic-1.c @@ -1,7 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fopenmp" } */ -/* { dg-options "-O2 -fopenmp -march=pentium" { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O2 -fopenmp" { target lp64 } } */ +/* { dg-options "-O2 -march=pentium" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */ #ifdef __i386__ #include "../../../gcc/testsuite/gcc.dg/i386-cpuid.h" @@ -47,7 +45,7 @@ main (void) cpu_facilities = i386_cpuid (); - if ((cpu_facilities & bit_CX8) == 0) + if (!(cpu_facilities & bit_CX8)) return 0; #endif diff --git a/libgomp/testsuite/libgomp.c/atomic-10.c b/libgomp/testsuite/libgomp.c/atomic-10.c index 6565279b9e8..58edeed6c36 100644 --- a/libgomp/testsuite/libgomp.c/atomic-10.c +++ b/libgomp/testsuite/libgomp.c/atomic-10.c @@ -1,5 +1,4 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fopenmp" } */ extern void abort (void); int x1, x2, x3, x4, x5; diff --git a/libgomp/testsuite/libgomp.c/atomic-2.c b/libgomp/testsuite/libgomp.c/atomic-2.c index 6f4939256b7..50529ebe675 100644 --- a/libgomp/testsuite/libgomp.c/atomic-2.c +++ b/libgomp/testsuite/libgomp.c/atomic-2.c @@ -1,7 +1,5 @@ /* { dg-do run } */ -/* { dg-options "-O2 -fopenmp" } */ -/* { dg-options "-O2 -fopenmp -march=nocona" { target i?86-*-* x86_64-*-* } } */ -/* { dg-options "-O2 -fopenmp" { target ilp32 } } */ +/* { dg-options "-O2 -mcx16" { target { { i?86-*-* x86_64-*-* } && lp64 } } } */ double d = 1.5; long double ld = 3; @@ -22,12 +20,11 @@ int main (void) { #ifdef __x86_64__ -# define bit_SSE3 (1 << 0) # define bit_CX16 (1 << 13) unsigned int ax, bx, cx, dx; __asm__ ("cpuid" : "=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "0" (1) : "cc"); - if ((cx & (bit_SSE3 | bit_CX16)) != (bit_SSE3 | bit_CX16)) + if (!(cx & bit_CX16)) return 0; #endif test (); diff --git a/libgomp/testsuite/libgomp.c/c.exp b/libgomp/testsuite/libgomp.c/c.exp index 8056a86054d..9eaab6252c3 100644 --- a/libgomp/testsuite/libgomp.c/c.exp +++ b/libgomp/testsuite/libgomp.c/c.exp @@ -8,7 +8,7 @@ load_lib libgomp-dg.exp # If a testcase doesn't have special options, use these. if ![info exists DEFAULT_CFLAGS] then { - set DEFAULT_CFLAGS "-O2 -fopenmp" + set DEFAULT_CFLAGS "-O2" } # Initialize dg. @@ -17,6 +17,9 @@ dg-init # Gather a list of all tests. set tests [lsort [find $srcdir/$subdir *.c]] +set ld_library_path $always_ld_library_path +set_ld_library_path_env_vars + # Main loop. dg-runtest $tests "" $DEFAULT_CFLAGS diff --git a/libgomp/testsuite/libgomp.c/pr29947-1.c b/libgomp/testsuite/libgomp.c/pr29947-1.c index 78b40ac5ae5..509c6322982 100644 --- a/libgomp/testsuite/libgomp.c/pr29947-1.c +++ b/libgomp/testsuite/libgomp.c/pr29947-1.c @@ -1,5 +1,5 @@ /* PR libgomp/29947 */ -/* { dg-options "-O2 -fopenmp" } */ + /* { dg-do run } */ extern void abort (void); diff --git a/libgomp/testsuite/libgomp.c/pr29947-2.c b/libgomp/testsuite/libgomp.c/pr29947-2.c index 231cd5d2721..09749831173 100644 --- a/libgomp/testsuite/libgomp.c/pr29947-2.c +++ b/libgomp/testsuite/libgomp.c/pr29947-2.c @@ -1,5 +1,5 @@ /* PR libgomp/29947 */ -/* { dg-options "-O2 -fopenmp" } */ + /* { dg-do run } */ extern void abort (void); |