diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0aaa68d63c8..a0af90a3ebe 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,59 @@ +2003-06-12 Mark Mitchell + + * lib/gcc-dg.exp (dg-require-dll): New function. + (dg-xfail-if): Likewise. + * gcc.c-torture/compile/compile.exp: Use dg rather than c-torture + driver. + + * gcc.c-torture/compile/20000804-1.c: Convert to dg format. + * gcc.c-torture/compile/20001205-1.c: Likewise. + * gcc.c-torture/compile/20001226-1.c: Likewise. + * gcc.c-torture/compile/20010518-2.c: Likewise. + * gcc.c-torture/compile/20020312-1.c: Likewise. + * gcc.c-torture/compile/20020604-1.c: Likewise. + * gcc.c-torture/compile/920501-12.c: Likewise. + * gcc.c-torture/compile/920501-4.c: Likewise. + * gcc.c-torture/compile/920520-1.c: Likewise. + * gcc.c-torture/compile/920521-1.c: Likewise. + * gcc.c-torture/compile/920625-1.c: Likewise. + * gcc.c-torture/compile/961203-1.c: Likewise. + * gcc.c-torture/compile/980506-1.c: Likewise. + * gcc.c-torture/compile/981006-1.c: Likewise. + * gcc.c-torture/compile/981022-1.c: Likewise. + * gcc.c-torture/compile/981223-1.c: Likewise. + * gcc.c-torture/compile/990617-1.c: Likewise. + * gcc.c-torture/compile/dll.c: Likewise. + * gcc.c-torture/compile/labels-3.c: Likewise. + * gcc.c-torture/compile/mipscop-1.c: Likewise. + * gcc.c-torture/compile/mipscop-2.c: Likewise. + * gcc.c-torture/compile/mipscop-3.c: Likewise. + * gcc.c-torture/compile/mipscop-4.c: Likewise. + * gcc.c-torture/compile/simd-5.c: Likewise. + * gcc.c-torture/compile/20000804-1.x: Remove. + * gcc.c-torture/compile/20001205-1.x: Likewise. + * gcc.c-torture/compile/20001226-1.x: Likewise. + * gcc.c-torture/compile/20010518-2.x: Likewise. + * gcc.c-torture/compile/20020312-1.x: Likewise. + * gcc.c-torture/compile/20020604-1.x: Likewise. + * gcc.c-torture/compile/920501-12.x: Likewise. + * gcc.c-torture/compile/920501-4.x: Likewise. + * gcc.c-torture/compile/920520-1.x: Likewise. + * gcc.c-torture/compile/920521-1.x: Likewise. + * gcc.c-torture/compile/920625-1.x: Likewise. + * gcc.c-torture/compile/961203-1.x: Likewise. + * gcc.c-torture/compile/980506-1.x: Likewise. + * gcc.c-torture/compile/981006-1.x: Likewise. + * gcc.c-torture/compile/981022-1.x: Likewise. + * gcc.c-torture/compile/981223-1.x: Likewise. + * gcc.c-torture/compile/990617-1.x: Likewise. + * gcc.c-torture/compile/mipscop-1.x: Likewise. + * gcc.c-torture/compile/mipscop-2.x: Likewise. + * gcc.c-torture/compile/mipscop-3.x: Likewise. + * gcc.c-torture/compile/mipscop-4.x: Likewise. + * gcc.c-torture/compile/simd-5.x: Likewise. + + * gcc.c-torture/compile/20021205-1.c: Remove bogus dg commands. + 2003-06-13 Eric Botcazou * gcc.c-torture/execute/20030611-1.c: New test. diff --git a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c index d99cb7b5584..782764b31bb 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20000804-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20000804-1.c @@ -1,4 +1,8 @@ -/* Copyright (C) 2000 Free Software Foundation */ +/* This does not work on m68hc11 or h8300 due to the use of an asm + statement to force a 'long long' (64-bits) to go in a register. */ +/* { dg-do assemble { xfail m6811-*-* m6812-*-* h8300-*-* } } */ + +/* Copyright (C) 2000, 2003 Free Software Foundation */ __complex__ long long f () { int i[99]; diff --git a/gcc/testsuite/gcc.c-torture/compile/20000804-1.x b/gcc/testsuite/gcc.c-torture/compile/20000804-1.x deleted file mode 100644 index 8c3618b795f..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20000804-1.x +++ /dev/null @@ -1,10 +0,0 @@ -# This does not work on m68hc11 or h8300 due to the use of an asm statement -# to force a 'long long' (64-bits) to go in a register. - -if { [istarget "m6811-*-*"] - || [istarget "m6812-*-*"] - || [istarget "h8300-*-*"] } { - return 1 -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/20001205-1.c b/gcc/testsuite/gcc.c-torture/compile/20001205-1.c index 69708e59ea0..4a917a2e2d7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20001205-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20001205-1.c @@ -1,3 +1,7 @@ +/* This does not work on m68hc11 due to the asm statement which forces + two 'long' (32-bits) variables to go in registers. */ +/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */ + static inline unsigned long rdfpcr(void) { unsigned long tmp, ret; diff --git a/gcc/testsuite/gcc.c-torture/compile/20001205-1.x b/gcc/testsuite/gcc.c-torture/compile/20001205-1.x deleted file mode 100644 index 134cdf109fe..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20001205-1.x +++ /dev/null @@ -1,7 +0,0 @@ -# This does not work on m68hc11 due to the asm statement which -# forces two 'long' (32-bits) variables to go in registers. - -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - return 1 -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c index 54dacf74167..0e71b1445ee 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c @@ -1,3 +1,8 @@ +/* This does not assemble on m68hc11 because the function is larger + than 64K. */ +/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */ +/* { dg-xfail-if "jump beyond 128K not supported" "xtensa-*-*" "-O0" "" } */ + /* This testcase exposed two branch shortening bugs on powerpc. */ #define C(a,b) \ diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.x b/gcc/testsuite/gcc.c-torture/compile/20001226-1.x deleted file mode 100644 index 6e46f46724e..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.x +++ /dev/null @@ -1,22 +0,0 @@ -# This does not assemble on m68hc11 because the function is larger -# than 64K. - -global target_triplet -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - return 1 -} - -# It doesn't work on Xtensa with -O0 because the function is larger -# than the range of a jump instruction (+- 128K) and the assembler -# does not yet relax jumps to indirect jumps. - -set torture_eval_before_compile { - set compiler_conditional_xfail_data { - "jump beyond 128K not supported" \ - "xtensa-*-*" \ - { "-O0" } \ - { "" } - } -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/20010518-2.c b/gcc/testsuite/gcc.c-torture/compile/20010518-2.c index aa8ce344c05..f35d7c6b96d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20010518-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/20010518-2.c @@ -1,3 +1,10 @@ +/* { dg-do compile } */ + +/* This test fails on HC11/HC12 when it is compiled without -mshort because + the array is too large (INT_MAX/2 > 64K). Force to use 16-bit ints + for it. */ +/* { dg-options "-w -mshort" { target m6811-*-* m6812-*-* } } */ + /* Large static storage. */ #include diff --git a/gcc/testsuite/gcc.c-torture/compile/20010518-2.x b/gcc/testsuite/gcc.c-torture/compile/20010518-2.x deleted file mode 100644 index 1bd6f8fd464..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20010518-2.x +++ /dev/null @@ -1,8 +0,0 @@ -# This test fails on HC11/HC12 when it is compiled without -mshort because -# the array is too large (INT_MAX/2 > 64K). Force to use 16-bit ints for it. -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - set options "-S -mshort" -} else { - set options "-S" -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/20020312-1.c b/gcc/testsuite/gcc.c-torture/compile/20020312-1.c index 9f61dae64a5..c50e4919a2b 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20020312-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20020312-1.c @@ -1,3 +1,7 @@ +/* This does not compile on HC11/HC12 due to the asm which requires + two 32-bit registers. */ +/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */ + /* PR optimization/5892 */ typedef struct { unsigned long a; unsigned int b, c; } A; typedef struct { unsigned long a; A *b; int c; } B; diff --git a/gcc/testsuite/gcc.c-torture/compile/20020312-1.x b/gcc/testsuite/gcc.c-torture/compile/20020312-1.x deleted file mode 100644 index 105f2516474..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20020312-1.x +++ /dev/null @@ -1,6 +0,0 @@ -# This does not compile on HC11/HC12 due to the asm which requires -# two 32-bit registers. -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - return 1 -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c index 19e082030a4..fca4a535893 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c @@ -1,3 +1,6 @@ +/* The array is too big. */ +/* { dg-do assemble { xfail h8300-*-* m6811-*-* m6812-*-* } } */ + /* PR c/6957 This testcase ICEd at -O2 on IA-32, because (insn 141 139 142 (set (subreg:SF (reg:QI 72) 0) diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.x b/gcc/testsuite/gcc.c-torture/compile/20020604-1.x deleted file mode 100644 index bced22f0f44..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.x +++ /dev/null @@ -1,10 +0,0 @@ -# The array is too big. -if { [istarget "h8300-*-*"] } { - return 1; -} - -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - return 1; -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/20021205-1.c b/gcc/testsuite/gcc.c-torture/compile/20021205-1.c index 9c400cfac3a..73648e94951 100644 --- a/gcc/testsuite/gcc.c-torture/compile/20021205-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/20021205-1.c @@ -1,5 +1,3 @@ -/* dg-do compile */ -/* dg-options "-O3" */ typedef struct x x; extern void *baz(char *); struct x { char * (*bar) (int); }; diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-12.c b/gcc/testsuite/gcc.c-torture/compile/920501-12.c index 594e14178b9..61ff947270f 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-12.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-12.c @@ -1,3 +1,7 @@ +/* This test fails on HC11/HC12 when it is compiled without -mshort because + the stack arrays are too large. Force to use 16-bit ints for it. */ +/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */ + x(x){ return 3 + x;} a(x){int y[994]; return 3 + x;} b(x){int y[999]; return 2*(x + 3);} diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-12.x b/gcc/testsuite/gcc.c-torture/compile/920501-12.x deleted file mode 100644 index 61ba34933fb..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/920501-12.x +++ /dev/null @@ -1,6 +0,0 @@ -# This test fails on HC11/HC12 when it is compiled without -mshort because -# the stack arrays are too large. Force to use 16-bit ints for it. -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - set options "-mshort" -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-4.c b/gcc/testsuite/gcc.c-torture/compile/920501-4.c index 9cd2fd7bd7a..f6ddb19b57d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920501-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/920501-4.c @@ -1,3 +1,7 @@ +/* This test fails on HC11/HC12 when it is compiled without -mshort because + the 'r0' array is too large. Force to use 16-bit ints for it. */ +/* { dg-do assemble { xfail m6811-*-* m6812-*-* } } */ + foo () { int r0[8186 ]; diff --git a/gcc/testsuite/gcc.c-torture/compile/920501-4.x b/gcc/testsuite/gcc.c-torture/compile/920501-4.x deleted file mode 100644 index cf60af9be67..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/920501-4.x +++ /dev/null @@ -1,6 +0,0 @@ -# This test fails on HC11/HC12 when it is compiled without -mshort because -# the 'r0' array is too large. Force to use 16-bit ints for it. -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - set options "-mshort" -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/920520-1.c b/gcc/testsuite/gcc.c-torture/compile/920520-1.c index 6b1cd7b17c4..6837524fdb4 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920520-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920520-1.c @@ -1 +1,3 @@ +/* { dg-do compile { xfail m6811-*-* m6812-*-* } } */ + f(){asm("%0"::"r"(1.5F));}g(){asm("%0"::"r"(1.5));} diff --git a/gcc/testsuite/gcc.c-torture/compile/920520-1.x b/gcc/testsuite/gcc.c-torture/compile/920520-1.x deleted file mode 100644 index 3687bf6145d..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/920520-1.x +++ /dev/null @@ -1,9 +0,0 @@ -set options "-S" - -# This does not work on m68hc11 due to the asm which forces a -# float or a double to go in a register. - -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - return 1 -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/920521-1.c b/gcc/testsuite/gcc.c-torture/compile/920521-1.c index 95b949798dc..6c4c99d70f6 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920521-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920521-1.c @@ -1 +1,3 @@ +/* { dg-do compile } */ + f(){asm("f":::"cc");}g(x,y){asm("g"::"%r"(x), "r"(y));} diff --git a/gcc/testsuite/gcc.c-torture/compile/920521-1.x b/gcc/testsuite/gcc.c-torture/compile/920521-1.x deleted file mode 100644 index 4cfce33b2dc..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/920521-1.x +++ /dev/null @@ -1,2 +0,0 @@ -set options "-S" -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/920625-1.c b/gcc/testsuite/gcc.c-torture/compile/920625-1.c index 720d43fd42f..137e0dc1f17 100644 --- a/gcc/testsuite/gcc.c-torture/compile/920625-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/920625-1.c @@ -1,3 +1,18 @@ +/* The problem on IA-64 is that if-conversion creates a sequence + + (p17) cmp.geu p6, p7 = r48, r15 + (p16) cmp.gtu p6, p7 = r48, r15 + + where p16 and p17 are complemenary, but the assembler DV validation + code doesn't recognize that p6 and p7 are complimentary, and so + we end up warning for a later use + + (p6) addl r14 = 1, r0 + (p7) mov r14 = r0 + + that appears to be a WAW violation. */ +/* { dg-xfail-if "missing .pred.rel.mutex directive" "ia64-*-*" { "-O1" "-O2" "-O3" "-Os" } { "" } } */ + typedef unsigned long int unsigned_word; typedef signed long int signed_word; typedef unsigned_word word; diff --git a/gcc/testsuite/gcc.c-torture/compile/920625-1.x b/gcc/testsuite/gcc.c-torture/compile/920625-1.x deleted file mode 100644 index 08a5f6771c7..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/920625-1.x +++ /dev/null @@ -1,25 +0,0 @@ -# The problem on IA-64 is that if-conversion creates a sequence -# -# (p17) cmp.geu p6, p7 = r48, r15 -# (p16) cmp.gtu p6, p7 = r48, r15 -# -# where p16 and p17 are complemenary, but the assembler DV validation -# code doesn't recognize that p6 and p7 are complimentary, and so -# we end up warning for a later use -# -# (p6) addl r14 = 1, r0 -# (p7) mov r14 = r0 -# -# that appears to be a WAW violation. - -set torture_eval_before_compile { - - set compiler_conditional_xfail_data { - "missing .pred.rel.mutex directive" \ - "ia64-*-*" \ - { "-O1" "-O2" "-O3" "-Os" } \ - { "" } - } -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/961203-1.c b/gcc/testsuite/gcc.c-torture/compile/961203-1.c index 0f066ace617..12aba52e7e0 100644 --- a/gcc/testsuite/gcc.c-torture/compile/961203-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/961203-1.c @@ -1,3 +1,7 @@ +/* The structure is too large for the xstormy16 - won't fit in 16 + bits. */ +/* { dg-do assemble { xfail xstormy16-*-* h8300-*-* m6811-*-* m6812-*-* } } */ + struct s { char a[0x32100000]; int x:30, y:30; diff --git a/gcc/testsuite/gcc.c-torture/compile/961203-1.x b/gcc/testsuite/gcc.c-torture/compile/961203-1.x deleted file mode 100644 index e705ffe167a..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/961203-1.x +++ /dev/null @@ -1,17 +0,0 @@ -# The structure is too large for the xstormy16 - won't fit in 16 bits. - -if { [istarget "xstormy16-*-*"] } { - return 1; -} - -if { [istarget "h8300-*-*"] } { - return 1 -} - -# Array 'a' in this test is too large to fit in 64K. - -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"]} { - return 1 -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/980506-1.c b/gcc/testsuite/gcc.c-torture/compile/980506-1.c index 6ef7796261f..834137244f9 100644 --- a/gcc/testsuite/gcc.c-torture/compile/980506-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/980506-1.c @@ -1,3 +1,6 @@ +/* The arrays are too large for the xstormy16 - won't fit in 16 bits. */ +/* { dg-do assemble { xfail xstormy16-*-* h8300-*-* m6811-*-* m6812-*-* } } */ + unsigned char TIFFFax2DMode[20][256]; unsigned char TIFFFax2DNextState[20][256]; unsigned char TIFFFaxUncompAction[20][256]; diff --git a/gcc/testsuite/gcc.c-torture/compile/980506-1.x b/gcc/testsuite/gcc.c-torture/compile/980506-1.x deleted file mode 100644 index 133ed24d944..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/980506-1.x +++ /dev/null @@ -1,13 +0,0 @@ -# The arrays are too large for the xstormy16 - won't fit in 16 bits. -if { [istarget "xstormy16-*-*"] } { - return 1; -} - -if { [istarget "h8300-*-*"] } { - return 1; -} - -if { [istarget "m6811-*-*"] || [istarget "m6812-*-*"] } { - return 1 -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.c b/gcc/testsuite/gcc.c-torture/compile/981006-1.c index 6af6d9a8ea5..d71637328db 100644 --- a/gcc/testsuite/gcc.c-torture/compile/981006-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/981006-1.c @@ -3,7 +3,10 @@ used uninitialized. This is broken in egcs 1998/10/06 for mips in pic mode. */ -/* { dg-do compile } */ +/* { dg-do assemble } */ +/* For MIPS at least, pic is needed to trigger the problem. */ +/* { dg-options "-w -Wuninitialized -Werror -fpic" } */ +/* { dg-options "-w -Wuninitialized -Werror" { target rs6000-*-aix* powerpc*-*-aix* arm*-*-* xscale*-*-* strongarm*-*-* fr30-*-* sh-*-hms sh-*-coff h8300*-*-* mn10200*-*-* cris-*-elf* cris-*-aout* mmix-*-* } } */ int foo (int a, int b) { diff --git a/gcc/testsuite/gcc.c-torture/compile/981006-1.x b/gcc/testsuite/gcc.c-torture/compile/981006-1.x deleted file mode 100644 index a27a67bcaee..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/981006-1.x +++ /dev/null @@ -1,20 +0,0 @@ -# For MIPS at least, pic is needed to trigger the problem. -if { [istarget rs6000-*-aix*] - || [istarget powerpc*-*-aix*] - || [istarget arm*-*-*] - || [istarget xscale-*-*] - || [istarget strongarm*-*-*] - || [istarget fr30-*-*] - || [istarget sh-*-hms] - || [istarget sh-*-coff] - || [istarget h8300*-*-*] - || [istarget mn10200*-*-*] - || [istarget cris-*-elf*] - || [istarget cris-*-aout*] - || [istarget mmix-*-*] -} { - set options "-Wuninitialized -Werror" -} else { - set options "-Wuninitialized -Werror -fpic" -} -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/981022-1.c b/gcc/testsuite/gcc.c-torture/compile/981022-1.c index 6256673804a..46369fc8181 100644 --- a/gcc/testsuite/gcc.c-torture/compile/981022-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/981022-1.c @@ -4,6 +4,6 @@ int x, y; int main () { - (x ?: y) = 0; + (x ?: y) = 0; /* { dg-bogus "lvalue" "" { xfail *-*-* } } */ return 0; } diff --git a/gcc/testsuite/gcc.c-torture/compile/981022-1.x b/gcc/testsuite/gcc.c-torture/compile/981022-1.x deleted file mode 100644 index f41cdc29913..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/981022-1.x +++ /dev/null @@ -1,2 +0,0 @@ -set torture_compile_xfail "*-*-*" -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/981223-1.c b/gcc/testsuite/gcc.c-torture/compile/981223-1.c index d207ff10bb3..d0939f62eaf 100644 --- a/gcc/testsuite/gcc.c-torture/compile/981223-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/981223-1.c @@ -1,3 +1,12 @@ +/* The problem on IA-64 is that the assembler emits + + Warning: Additional NOP may be necessary to workaround Itanium + processor A/B step errata + + This can be fixed by adding "-mb-step" to the command line, which + does in fact add the extra nop. */ +/* { dg-options "-w -mb-step" { target ia64-*-* } } */ + __complex__ float func (__complex__ float x) { diff --git a/gcc/testsuite/gcc.c-torture/compile/981223-1.x b/gcc/testsuite/gcc.c-torture/compile/981223-1.x deleted file mode 100644 index f8d2aa6f938..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/981223-1.x +++ /dev/null @@ -1,20 +0,0 @@ -# The problem on IA-64 is that the assembler emits -# -# Warning: Additional NOP may be necessary to workaround Itanium -# processor A/B step errata -# -# This can be fixed by adding "-mb-step" to the command line, which -# does in fact add the extra nop, if someone can tell me how to do -# that for a c-torture compile test. - -set torture_eval_before_compile { - - set compiler_conditional_xfail_data { - "need -mb-step" \ - "ia64-*-*" \ - { "-O2" "-O3" "-Os" } \ - { "" } - } -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/990617-1.c b/gcc/testsuite/gcc.c-torture/compile/990617-1.c index 1404b793505..78a3ec132f5 100644 --- a/gcc/testsuite/gcc.c-torture/compile/990617-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/990617-1.c @@ -1,3 +1,6 @@ +/* 0x70000000 is too large a constant to become a pointer on + xstormy16. */ +/* { dg-do assemble { xfail xstormy16-*-* } } */ int main() { diff --git a/gcc/testsuite/gcc.c-torture/compile/990617-1.x b/gcc/testsuite/gcc.c-torture/compile/990617-1.x deleted file mode 100644 index b326395523b..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/990617-1.x +++ /dev/null @@ -1,7 +0,0 @@ -# 0x70000000 is too large a constant to become a pointer on xstormy16. - -if { [istarget "xstormy16-*-*"] } { - return 1; -} - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/compile.exp b/gcc/testsuite/gcc.c-torture/compile/compile.exp index 1b075a8b798..c873ed1280d 100644 --- a/gcc/testsuite/gcc.c-torture/compile/compile.exp +++ b/gcc/testsuite/gcc.c-torture/compile/compile.exp @@ -1,5 +1,5 @@ # Expect driver script for GCC Regression Tests -# Copyright (C) 1993, 1995, 1997 Free Software Foundation +# Copyright (C) 1993, 1995, 1997, 2003 Free Software Foundation # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -18,18 +18,17 @@ # These tests come from Torbjorn Granlund's (tege@cygnus.com) # C torture test suite, and other contributors. -if $tracelevel then { - strace $tracelevel -} +# Load support procs. +load_lib gcc-dg.exp -# load support procs -load_lib c-torture.exp +# Initialize `dg'. +dg-init -foreach testcase [glob -nocomplain $srcdir/$subdir/*.c] { - # If we're only testing specific files and this isn't one of them, skip it. - if ![runtest_file_p $runtests $testcase] then { - continue - } +# Main loop. +set saved-dg-do-what-default ${dg-do-what-default} +set dg-do-what-default "assemble" +gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-w" +set dg-do-what-default ${saved-dg-do-what-default} - c-torture $testcase -} +# All done. +dg-finish diff --git a/gcc/testsuite/gcc.c-torture/compile/dll.c b/gcc/testsuite/gcc.c-torture/compile/dll.c index bf0d1544ad0..7f7bfcee55c 100644 --- a/gcc/testsuite/gcc.c-torture/compile/dll.c +++ b/gcc/testsuite/gcc.c-torture/compile/dll.c @@ -1,3 +1,5 @@ +/* { dg-require-dll "" } */ + __declspec (dllimport) int foo; extern int (* import) (void) __attribute__((dllimport)); int func2 (void) __attribute__((dllexport)); diff --git a/gcc/testsuite/gcc.c-torture/compile/labels-3.c b/gcc/testsuite/gcc.c-torture/compile/labels-3.c index 51ac88380b8..14eb9522f68 100644 --- a/gcc/testsuite/gcc.c-torture/compile/labels-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/labels-3.c @@ -1,3 +1,9 @@ +/* This test does not compile on mips-irix6 using the native assembler, + though it does work with gas. See PR6200. Since we cannot (???) + distinguish which assembler is being used, always pass -S for + irix. */ +/* { dg-options "-w -S" { target mips*-*-irix* } } */ + /* Verify that we can narrow the storage associated with label diffs. */ int foo (int a) diff --git a/gcc/testsuite/gcc.c-torture/compile/labels-3.x b/gcc/testsuite/gcc.c-torture/compile/labels-3.x deleted file mode 100644 index e9b4118ff44..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/labels-3.x +++ /dev/null @@ -1,7 +0,0 @@ -# This test does not compile on mips-irix6 using the native assembler, -# though it does work with gas. See PR6200. Since we cannot (???) -# distinguish which assembler is being used, always pass -S for irix. - -if { [istarget "mips*-*-irix*"] } { set options "-S" } - -return 0 diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c index 13be5142d94..478b423e2d7 100644 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c +++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-1.c @@ -1,3 +1,5 @@ +/* { dg-do assemble {target *mips*-*-* } } */ + register unsigned int cp0count asm ("$c0r1"); int diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-1.x b/gcc/testsuite/gcc.c-torture/compile/mipscop-1.x deleted file mode 100644 index 66601ea91f1..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-1.x +++ /dev/null @@ -1,10 +0,0 @@ -global target_triplet - -if { ![istarget "*mips*"] } { - return 1 -} else { - set torture_compile_xfail "$target_triplet" -} - -return 0 - diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c index 88e95db12cc..0ba5610b623 100644 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c +++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-2.c @@ -1,3 +1,5 @@ +/* { dg-do assemble {target *mips*-*-* } } */ + register unsigned int c3r1 asm ("$c3r1"); extern unsigned int b, c; diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-2.x b/gcc/testsuite/gcc.c-torture/compile/mipscop-2.x deleted file mode 100644 index 66601ea91f1..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-2.x +++ /dev/null @@ -1,10 +0,0 @@ -global target_triplet - -if { ![istarget "*mips*"] } { - return 1 -} else { - set torture_compile_xfail "$target_triplet" -} - -return 0 - diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c index eb602c8a54f..3a4250cc358 100644 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c +++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-3.c @@ -1,3 +1,5 @@ +/* { dg-do assemble {target *mips*-*-* } } */ + register unsigned int c3r1 asm ("$c3r1"), c3r2 asm ("$c3r2"); extern unsigned int b, c; diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-3.x b/gcc/testsuite/gcc.c-torture/compile/mipscop-3.x deleted file mode 100644 index 66601ea91f1..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-3.x +++ /dev/null @@ -1,10 +0,0 @@ -global target_triplet - -if { ![istarget "*mips*"] } { - return 1 -} else { - set torture_compile_xfail "$target_triplet" -} - -return 0 - diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c b/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c index 368db5e90dc..a30146224c1 100644 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c +++ b/gcc/testsuite/gcc.c-torture/compile/mipscop-4.c @@ -1,3 +1,5 @@ +/* { dg-do assemble {target *mips*-*-* } } */ + register unsigned long c3r1 asm ("$c3r1"), c3r2 asm ("$c3r2"); extern unsigned long b, c; diff --git a/gcc/testsuite/gcc.c-torture/compile/mipscop-4.x b/gcc/testsuite/gcc.c-torture/compile/mipscop-4.x deleted file mode 100644 index 66601ea91f1..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/mipscop-4.x +++ /dev/null @@ -1,10 +0,0 @@ -global target_triplet - -if { ![istarget "*mips*"] } { - return 1 -} else { - set torture_compile_xfail "$target_triplet" -} - -return 0 - diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-5.c b/gcc/testsuite/gcc.c-torture/compile/simd-5.c index 016cccd1e9f..35b511879c3 100644 --- a/gcc/testsuite/gcc.c-torture/compile/simd-5.c +++ b/gcc/testsuite/gcc.c-torture/compile/simd-5.c @@ -1,3 +1,11 @@ +/* h8300 does not have long long */ +/* PowerPC-64 doesn't handle this; see PR target/9680 */ +/* { dg-do assemble { xfail h8300-*-* powerpc64-*-* } } */ +/* On SPARC64/SPARC-V9 it fails, except with -m32. */ +/* { dg-xfail-if "PR target/9200" { "sparc64-*-*" "sparcv9-*-*" } { "*" } { "-m32" } } */ +/* On regular SPARC it doesn't fail, except with -m64. */ +/* { dg-xfail-if "PR target/9200" { "sparc*-*-*" } { "-m64" } { "" } } */ + #define vector64 __attribute__((vector_size(8))) main(){ diff --git a/gcc/testsuite/gcc.c-torture/compile/simd-5.x b/gcc/testsuite/gcc.c-torture/compile/simd-5.x deleted file mode 100644 index 28f7e876123..00000000000 --- a/gcc/testsuite/gcc.c-torture/compile/simd-5.x +++ /dev/null @@ -1,30 +0,0 @@ -# h8300 does not have long long -if { [istarget "h8300-*-*"] } { - return 1; -} - -if { [istarget "sparc64-*-*"] || [istarget "sparcv9-*-*"] } { - # On SPARC64/SPARC-V9 it fails, except with -m32. - set torture_eval_before_compile { - global compiler_conditional_xfail_data - set compiler_conditional_xfail_data { - "PR target/9200" \ - { "*-*-*" } \ - { "*" } \ - { "-m32" } - } - } -} elseif { [istarget "sparc-*-*"] } { - # On regular SPARC it doesn't fail, except with -m64. - set torture_eval_before_compile { - global compiler_conditional_xfail_data - set compiler_conditional_xfail_data { - "PR target/9200" \ - { "*-*-*" } \ - { "-m64" } \ - { "" } - } - } -} - -return 0 diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp index 1feadc4a080..69cf6fb2379 100644 --- a/gcc/testsuite/lib/gcc-dg.exp +++ b/gcc/testsuite/lib/gcc-dg.exp @@ -295,6 +295,30 @@ proc dg-require-gc-sections { args } { } } +# If this target does not support DLL attributes skip this test. + +proc dg-require-dll { args } { + global target_triplet + # As a special case, the mcore-*-elf supports dllimport/dllexport. + if { [string match "mcore-*-elf" $target_triplet] } { + return + } + # PE/COFF targets support dllimport/dllexport. + if { [gcc_target_object_format] == "pe" } { + return + } + + upvar dg-do-what dg-do-what + set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"] +} + +# Like check_conditional_xfail, but callable from a dg test. + +proc dg-xfail-if { args } { + eval check_conditional_xfail $args +} + + # We need to make sure that additional_files and additional_sources # are both cleared out after every test. It is not enough to clear # them out *before* the next test run because gcc-target-compile gets