OSDN Git Service

* lib/gcc-dg.exp (dg-require-dll): New function.
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Jun 2003 05:41:02 +0000 (05:41 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 13 Jun 2003 05:41:02 +0000 (05:41 +0000)
(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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67881 138bc75d-0d04-0410-961f-82ee72b054a4

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 0aaa68d..a0af90a 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 d99cb7b..782764b 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 69708e5..4a917a2 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 54dacf7..0e71b14 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 aa8ce34..f35d7c6 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 9f61dae..c50e491 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 19e0820..fca4a53 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 9c400cf..73648e9 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 594e141..61ff947 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 9cd2fd7..f6ddb19 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 6b1cd7b..6837524 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 95b9497..6c4c99d 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 720d43f..137e0dc 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 0f066ac..12aba52 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 6ef7796..8341372 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 6af6d9a..d716373 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 6256673..46369fc 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 d207ff1..d0939f6 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 1404b79..78a3ec1 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 1b075a8..c873ed1 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 bf0d154..7f7bfce 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 51ac883..14eb952 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 13be514..478b423 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 88e95db..0ba5610 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 eb602c8..3a4250c 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 368db5e..a301462 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 016cccd..35b5118 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 1feadc4..69cf6fb 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