gcc-dg.exp (dg-require-dll): New function.
authorMark Mitchell <mark@codesourcery.com>
Fri, 13 Jun 2003 05:41:02 +0000 (05:41 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Fri, 13 Jun 2003 05:41:02 +0000 (05:41 +0000)
* 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.

From-SVN: r67881

51 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20000804-1.c
gcc/testsuite/gcc.c-torture/compile/20000804-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/20001205-1.c
gcc/testsuite/gcc.c-torture/compile/20001205-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/20001226-1.c
gcc/testsuite/gcc.c-torture/compile/20001226-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/20010518-2.c
gcc/testsuite/gcc.c-torture/compile/20010518-2.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/20020312-1.c
gcc/testsuite/gcc.c-torture/compile/20020312-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/20020604-1.c
gcc/testsuite/gcc.c-torture/compile/20020604-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/20021205-1.c
gcc/testsuite/gcc.c-torture/compile/920501-12.c
gcc/testsuite/gcc.c-torture/compile/920501-12.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/920501-4.c
gcc/testsuite/gcc.c-torture/compile/920501-4.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/920520-1.c
gcc/testsuite/gcc.c-torture/compile/920520-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/920521-1.c
gcc/testsuite/gcc.c-torture/compile/920521-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/920625-1.c
gcc/testsuite/gcc.c-torture/compile/920625-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/961203-1.c
gcc/testsuite/gcc.c-torture/compile/961203-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/980506-1.c
gcc/testsuite/gcc.c-torture/compile/980506-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/981006-1.c
gcc/testsuite/gcc.c-torture/compile/981006-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/981022-1.c
gcc/testsuite/gcc.c-torture/compile/981022-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/981223-1.c
gcc/testsuite/gcc.c-torture/compile/981223-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/990617-1.c
gcc/testsuite/gcc.c-torture/compile/990617-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/compile.exp
gcc/testsuite/gcc.c-torture/compile/dll.c
gcc/testsuite/gcc.c-torture/compile/labels-3.c
gcc/testsuite/gcc.c-torture/compile/labels-3.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/mipscop-1.c
gcc/testsuite/gcc.c-torture/compile/mipscop-1.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/mipscop-2.c
gcc/testsuite/gcc.c-torture/compile/mipscop-2.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/mipscop-3.c
gcc/testsuite/gcc.c-torture/compile/mipscop-3.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/mipscop-4.c
gcc/testsuite/gcc.c-torture/compile/mipscop-4.x [deleted file]
gcc/testsuite/gcc.c-torture/compile/simd-5.c
gcc/testsuite/gcc.c-torture/compile/simd-5.x [deleted file]
gcc/testsuite/lib/gcc-dg.exp

index 0aaa68d63c8423e855fc19fe49e671fe4213bc21..a0af90a3ebeb5237c1851feb38779927693047fc 100644 (file)
@@ -1,3 +1,59 @@
+2003-06-12  Mark Mitchell  <mark@codesourcery.com>
+
+       * 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  <ebotcazou@libertysurf.fr>
 
        * gcc.c-torture/execute/20030611-1.c: New test.
index d99cb7b5584934c20ee33db8c4afd0a056718d78..782764b31bb340bb757663bac2c078b4b07bcd8a 100644 (file)
@@ -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 (file)
index 8c3618b..0000000
+++ /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
index 69708e59ea049d42302ec6945a2347993f2f74d1..4a917a2e2d79b093d95bfed46196d6d71d1e13ed 100644 (file)
@@ -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 (file)
index 134cdf1..0000000
+++ /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
index 54dacf74167c110cd7dea44cc6f6d404f98cc6bb..0e71b1445ee917d16f3dd81957df8fa2df349b48 100644 (file)
@@ -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 (file)
index 6e46f46..0000000
+++ /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
index aa8ce344c052b7dbfc50a069633c03c0d303e634..f35d7c6b96d9f062cb7f8926bda99bbb3b3fbfb4 100644 (file)
@@ -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 <limits.h>
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 (file)
index 1bd6f8f..0000000
+++ /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
index 9f61dae64a576cef42f37e36b8cf8f0e2f14f483..c50e4919a2b192c00aec4f85cca1e8c538b0bed4 100644 (file)
@@ -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 (file)
index 105f251..0000000
+++ /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
index 19e082030a4cb366750d752a520a6b180f671480..fca4a53589364222ec3f989bbd4769482e7a6227 100644 (file)
@@ -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 (file)
index bced22f..0000000
+++ /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
index 9c400cfac3aa280f60dbf0865e23ad6557022f87..73648e94951512caa851544859bef13f31d0aa9a 100644 (file)
@@ -1,5 +1,3 @@
-/* dg-do compile */
-/* dg-options "-O3" */
 typedef struct x x;
 extern void *baz(char *);
 struct x { char * (*bar) (int); };
index 594e14178b9b016def47c210b5c8c594ac354e90..61ff947270f480e468a141c513b218806acabb61 100644 (file)
@@ -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 (file)
index 61ba349..0000000
+++ /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
index 9cd2fd7bd7af4c6bf08241bd8765ac5a368df04d..f6ddb19b57d59c9f700e52796fe011123a3e4c2e 100644 (file)
@@ -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 (file)
index cf60af9..0000000
+++ /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
index 6b1cd7b17c4ac7fc56a0f83e9e677c0664f31a6b..6837524fdb4b23395785227262b9eb01da5b54fa 100644 (file)
@@ -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 (file)
index 3687bf6..0000000
+++ /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
index 95b949798dcfbea5a1290c22d62e8a115dd72977..6c4c99d70f66188fd46a165c11b0f0550af754ba 100644 (file)
@@ -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 (file)
index 4cfce33..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-set options "-S"
-return 0
index 720d43fd42fa20863ce2440636c0ec794eb5c061..137e0dc1f17f1216b6d512aedfb00c36fc6ff05f 100644 (file)
@@ -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 (file)
index 08a5f67..0000000
+++ /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
index 0f066ace61776b4a78f69c1659f9e804a0f4a766..12aba52e7e0fcf431803ed6c89aa21180bf15d31 100644 (file)
@@ -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 (file)
index e705ffe..0000000
+++ /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
index 6ef7796261f591102d3b344c68c1b724ce5f8594..834137244f903cc5faace8e11d0d3808ad710dea 100644 (file)
@@ -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 (file)
index 133ed24..0000000
+++ /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
index 6af6d9a8ea5afc93bd3aed600bda5822ecebb6c6..d71637328dbae50079e6dacfd93d066296886ba4 100644 (file)
@@ -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 (file)
index a27a67b..0000000
+++ /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
index 6256673804a0be1ff660746d4ec6bb3bd9256541..46369fc81815327010a4c3149ccb9d26f3b3ca09 100644 (file)
@@ -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 (file)
index f41cdc2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-set torture_compile_xfail "*-*-*"
-return 0
index d207ff10bb3788e9eb50e22de4b2ed29fe80490b..d0939f62eaf963a6006cda890f53c74821f8550c 100644 (file)
@@ -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 (file)
index f8d2aa6..0000000
+++ /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
index 1404b793505646998c43a07b102b9101c329cabc..78a3ec132f56036059250d04d4ebc9fa093cb4d8 100644 (file)
@@ -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 (file)
index b326395..0000000
+++ /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
index 1b075a8b7981c32260f7d12bfe90396bba730ed5..c873ed1280debef3f95756f4e59e7e61d0cff4ea 100644 (file)
@@ -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
 # 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
index bf0d1544ad051a3a6777122138b82dc30689f58b..7f7bfcee55c6a030626d014fe3e00a4b7f074f65 100644 (file)
@@ -1,3 +1,5 @@
+/* { dg-require-dll "" } */
+
 __declspec (dllimport) int foo;
 extern int (* import) (void) __attribute__((dllimport));
 int func2 (void) __attribute__((dllexport));
index 51ac88380b828a49da54237cd5d6636758072e8c..14eb9522f6807e37505047a35347f918f8249c8b 100644 (file)
@@ -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 (file)
index e9b4118..0000000
+++ /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
index 13be5142d944057d87356f2c0e9313b99e277461..478b423e2d78d62c01629500ab07c572c3971a19 100644 (file)
@@ -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 (file)
index 66601ea..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-global target_triplet
-
-if { ![istarget "*mips*"] } {
-       return 1
-} else {
-       set torture_compile_xfail "$target_triplet"
-}
-
-return 0
-
index 88e95db12cc74b4efcc0e96bf72f2ea8b76657c9..0ba5610b623033e62a64bfb1f97b48c273f665d4 100644 (file)
@@ -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 (file)
index 66601ea..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-global target_triplet
-
-if { ![istarget "*mips*"] } {
-       return 1
-} else {
-       set torture_compile_xfail "$target_triplet"
-}
-
-return 0
-
index eb602c8a54f60864cea48e45d3da5a266f62290f..3a4250cc358deed0cf7d1166f0429fbe4550ec45 100644 (file)
@@ -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 (file)
index 66601ea..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-global target_triplet
-
-if { ![istarget "*mips*"] } {
-       return 1
-} else {
-       set torture_compile_xfail "$target_triplet"
-}
-
-return 0
-
index 368db5e90dcf39daa291e038c10fded9ecc5c4d4..a30146224c1f68e395c1d3d7e7e7abb1b363d2b1 100644 (file)
@@ -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 (file)
index 66601ea..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-global target_triplet
-
-if { ![istarget "*mips*"] } {
-       return 1
-} else {
-       set torture_compile_xfail "$target_triplet"
-}
-
-return 0
-
index 016cccd1e9faee96150d40855ca4aee190145c24..35b511879c3896006b9721af3a22d5e179655df5 100644 (file)
@@ -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 (file)
index 28f7e87..0000000
+++ /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
index 1feadc4a0802506f4eec9694bade3026681e685e..69cf6fb2379819c8b9be1c9b002ee435d7ca41c7 100644 (file)
@@ -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