OSDN Git Service

* g++.dg/compat/eh/filter2_x.C: Declare abort.
authordrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Sep 2008 03:17:22 +0000 (03:17 +0000)
committerdrow <drow@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 9 Sep 2008 03:17:22 +0000 (03:17 +0000)
* g++.dg/compat/eh/new1_x.C, g++.dg/compat/eh/new1_y.C: Include
cstddef and use std::size_t.

* gcc.dg/compat/compat-common.h: Define SKIP_COMPLEX_INT if
SKIP_COMPLEX.  Honor SKIP_COMPLEX.
* gcc.dg/compat/scalar-by-value-3_x.c,
gcc.dg/compat/scalar-by-value-3_y.c,
gcc.dg/compat/scalar-by-value-4_x.c,
gcc.dg/compat/scalar-by-value-4_y.c,
gcc.dg/compat/scalar-by-value-5.c,
gcc.dg/compat/scalar-by-value-5_main.c,
gcc.dg/compat/scalar-by-value-6.c,
gcc.dg/compat/scalar-by-value-6_main.c,
gcc.dg/compat/scalar-by-value-6_x.c,
gcc.dg/compat/scalar-by-value-6_y.c,
gcc.dg/compat/struct-by-value-16_x.c,
gcc.dg/compat/struct-by-value-16_y.c,
gcc.dg/compat/struct-by-value-16a_x.c,
gcc.dg/compat/struct-by-value-16a_y.c,
gcc.dg/compat/struct-by-value-17_x.c,
gcc.dg/compat/struct-by-value-17_y.c,
gcc.dg/compat/struct-by-value-17a_x.c,
gcc.dg/compat/struct-by-value-17a_y.c,
gcc.dg/compat/struct-by-value-18_x.c,
gcc.dg/compat/struct-by-value-18_y.c,
gcc.dg/compat/struct-by-value-18a_x.c,
gcc.dg/compat/struct-by-value-18a_y.c,
gcc.dg/compat/struct-layout-1.h,
gcc.dg/compat/scalar-return-3_x.c,
gcc.dg/compat/scalar-return-3_y.c,
gcc.dg/compat/scalar-return-4_x.c,
gcc.dg/compat/scalar-return-4_y.c: Honor SKIP_COMPLEX.

* gcc.dg/compat/scalar-by-value-y.h: Use stdarg.h for non-GCC
compilers.

* gcc.dg/compat/struct-by-value-22_y.c,
gcc.dg/compat/struct-by-value-22_main.c,
gcc.dg/compat/struct-by-value-22_x.c: Honor SKIP_VLA_IN_STRUCT.

* lib/c-compat.exp (compat_setup_dfp): Check the compiler under test
first.
* lib/compat.exp: Document COMPLEX and VLA_IN_STRUCT skips.

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

38 files changed:
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/compat/eh/filter2_x.C
gcc/testsuite/g++.dg/compat/eh/new1_x.C
gcc/testsuite/g++.dg/compat/eh/new1_y.C
gcc/testsuite/gcc.dg/compat/compat-common.h
gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-5.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-5_main.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-6.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-6_main.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-6_x.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-6_y.c
gcc/testsuite/gcc.dg/compat/scalar-by-value-y.h
gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-16_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-16a_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-16a_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-17_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-17a_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-17a_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-18_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-18a_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-18a_y.c
gcc/testsuite/gcc.dg/compat/struct-by-value-22_main.c
gcc/testsuite/gcc.dg/compat/struct-by-value-22_x.c
gcc/testsuite/gcc.dg/compat/struct-by-value-22_y.c
gcc/testsuite/gcc.dg/compat/struct-layout-1.h
gcc/testsuite/lib/c-compat.exp
gcc/testsuite/lib/compat.exp

index 138351a..e5ee823 100644 (file)
@@ -1,3 +1,51 @@
+2008-09-08  Daniel Jacobowitz  <dan@codesourcery.com>
+           Mark Mitchell  <mark@codesourcery.com>
+
+       * g++.dg/compat/eh/filter2_x.C: Declare abort.
+       * g++.dg/compat/eh/new1_x.C, g++.dg/compat/eh/new1_y.C: Include
+       cstddef and use std::size_t.
+
+       * gcc.dg/compat/compat-common.h: Define SKIP_COMPLEX_INT if
+       SKIP_COMPLEX.  Honor SKIP_COMPLEX.
+       * gcc.dg/compat/scalar-by-value-3_x.c,
+       gcc.dg/compat/scalar-by-value-3_y.c,
+       gcc.dg/compat/scalar-by-value-4_x.c,
+       gcc.dg/compat/scalar-by-value-4_y.c,
+       gcc.dg/compat/scalar-by-value-5.c,
+       gcc.dg/compat/scalar-by-value-5_main.c,
+       gcc.dg/compat/scalar-by-value-6.c,
+       gcc.dg/compat/scalar-by-value-6_main.c,
+       gcc.dg/compat/scalar-by-value-6_x.c,
+       gcc.dg/compat/scalar-by-value-6_y.c,
+       gcc.dg/compat/struct-by-value-16_x.c,
+       gcc.dg/compat/struct-by-value-16_y.c,
+       gcc.dg/compat/struct-by-value-16a_x.c,
+       gcc.dg/compat/struct-by-value-16a_y.c,
+       gcc.dg/compat/struct-by-value-17_x.c,
+       gcc.dg/compat/struct-by-value-17_y.c,
+       gcc.dg/compat/struct-by-value-17a_x.c,
+       gcc.dg/compat/struct-by-value-17a_y.c,
+       gcc.dg/compat/struct-by-value-18_x.c,
+       gcc.dg/compat/struct-by-value-18_y.c,
+       gcc.dg/compat/struct-by-value-18a_x.c,
+       gcc.dg/compat/struct-by-value-18a_y.c,
+       gcc.dg/compat/struct-layout-1.h,
+       gcc.dg/compat/scalar-return-3_x.c,
+       gcc.dg/compat/scalar-return-3_y.c,
+       gcc.dg/compat/scalar-return-4_x.c,
+       gcc.dg/compat/scalar-return-4_y.c: Honor SKIP_COMPLEX.
+
+       * gcc.dg/compat/scalar-by-value-y.h: Use stdarg.h for non-GCC
+       compilers.
+
+       * gcc.dg/compat/struct-by-value-22_y.c,
+       gcc.dg/compat/struct-by-value-22_main.c,
+       gcc.dg/compat/struct-by-value-22_x.c: Honor SKIP_VLA_IN_STRUCT.
+
+       * lib/c-compat.exp (compat_setup_dfp): Check the compiler under test
+       first.
+       * lib/compat.exp: Document COMPLEX and VLA_IN_STRUCT skips.
+
 2008-09-08  Andy Hutchinson  <hutchinsonandy@aim.com>
 
        * gcc.dg/struct/wo_prof_escape_substr_value.c: Limit allocation
index cdbffff..287ffc7 100644 (file)
@@ -1,6 +1,8 @@
 #include <exception>
 #include <cstdlib>
 
+extern "C" void abort (void);
+
 extern void my_terminate (void);
 extern void ex_test (void);
 
index 4ca3be0..1212871 100644 (file)
@@ -1,9 +1,10 @@
 #include <new>
+#include <cstddef>
 
 extern "C" void exit (int);
 extern "C" void abort (void);
 
-extern void * operator new[] (size_t s) throw (std::bad_alloc);
+extern void * operator new[] (std::size_t s) throw (std::bad_alloc);
 extern void operator delete[] (void *p) throw ();
 
 struct A
index c448cbe..fbe0e21 100644 (file)
@@ -1,9 +1,10 @@
 #include <new>
+#include <cstddef>
 
 extern int ret;
 
 void *ptr;
-void * operator new[] (size_t s) throw (std::bad_alloc)
+void * operator new[] (std::size_t s) throw (std::bad_alloc)
 {
   ptr = operator new (s);
   return ptr;
index 635e744..40d4e08 100644 (file)
 #define DEBUG_FINI
 #endif
 
+#ifdef SKIP_COMPLEX
+#ifndef SKIP_COMPLEX_INT
+#define SKIP_COMPLEX_INT
+#endif
+#endif
+
+#ifndef SKIP_COMPLEX
 #ifdef __GNUC__
 #define CINT(x, y) (x + y * __extension__ 1i)
 #define CDBL(x, y) (x + y * __extension__ 1i)
@@ -38,6 +45,7 @@
 #endif
 #define CDBL(x, y) (x + y * _Complex_I)
 #endif
+#endif
 
 extern void abort (void);
 extern int fails;
index 6f550b4..e63f5fd 100644 (file)
@@ -144,6 +144,7 @@ testit##NAME (void)                                         \
   DEBUG_NL;                                                    \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(ci, _Complex int, CINT (2, 3))
 T(cl, _Complex long, CINT (3, 4))
@@ -151,6 +152,7 @@ T(cll, _Complex long long, CINT (5, 6))
 #endif
 T(cd, _Complex double, CDBL (7.0, 8.0))
 T(cld, _Complex long double, CDBL (8.0, 9.0))
+#endif
 
 #undef T
 
@@ -161,6 +163,7 @@ DEBUG_INIT
 
 #define T(NAME) testit##NAME ();
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(ci)
 T(cl)
@@ -168,6 +171,7 @@ T(cll)
 #endif
 T(cd)
 T(cld)
+#endif
 
 DEBUG_FINI
 
index 1e12cc9..d470ef6 100644 (file)
@@ -84,6 +84,7 @@ testva##NAME (int n, ...)                                     \
     }                                                          \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(ci, _Complex int, CINT (2, 3))
 T(cl, _Complex long, CINT (3, 4))
@@ -91,3 +92,4 @@ T(cll, _Complex long long, CINT (5, 6))
 #endif
 T(cd, _Complex double, CDBL (7.0, 8.0))
 T(cld, _Complex long double, CDBL (8.0, 9.0))
+#endif
index adc8ece..a4e73c9 100644 (file)
@@ -68,11 +68,13 @@ testit##NAME (void)                                         \
   DEBUG_NL;                                                    \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(cc, _Complex char, CINT (0, 1))
 T(cs, _Complex short, CINT (1, 2))
 #endif
 T(cf, _Complex float, CDBL (6.0, 7.0))
+#endif
 
 #undef T
 
@@ -83,11 +85,13 @@ DEBUG_INIT
 
 #define T(NAME) testit##NAME ();
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(cc)
 T(cs)
 #endif
 T(cf)
+#endif
 
 DEBUG_FINI
 
index 0db32ab..e0fa705 100644 (file)
@@ -67,8 +67,10 @@ test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04,          \
   check##NAME (x16, 16);                                       \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(cc, _Complex char, CINT (0, 1))
 T(cs, _Complex short, CINT (1, 2))
 #endif
 T(cf, _Complex float, CDBL (6.0, 7.0))
+#endif
index 1fa713d..1c336d8 100644 (file)
@@ -2,15 +2,21 @@ TEST_FUNCS (longlong_i, long long, int,
            1234LL, -987)
 TEST_FUNCS (longlong_d, long long, double,
            1234LL, -987.0)
+#ifndef SKIP_COMPLEX
+#ifndef SKIP_COMPLEX_INT
 TEST_FUNCS (complexint_i, _Complex int, int,
            1234 + 567i, -987)
 TEST_FUNCS (complexint_d, _Complex int, double,
            1234 + 567i, -987.0)
+#endif
 TEST_FUNCS (complexdouble_i, _Complex double, int,
            1234.0 + 567.0i, -987)
 TEST_FUNCS (complexdouble_d, _Complex double, double,
            1234.0 + 567.0i, -987.0)
+#ifndef SKIP_COMPLEX_INT
 TEST_FUNCS (complexlonglong_i, _Complex long long, int,
            1234LL + 567LLi, -987)
 TEST_FUNCS (complexlonglong_d, _Complex long long, double,
            1234LL + 567LLi, -987.0)
+#endif
+#endif
index c57c6fe..d29597e 100644 (file)
@@ -16,6 +16,7 @@ int main (void)
 {
   longlong_i_doit ();
   longlong_d_doit ();
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
   complexint_i_doit ();
   complexint_d_doit ();
@@ -26,5 +27,6 @@ int main (void)
   complexlonglong_i_doit ();
   complexlonglong_d_doit ();
 #endif
+#endif
   exit (0);
 }
index 54c5d9b..af65398 100644 (file)
@@ -1,4 +1,6 @@
 TEST_FUNCS (longdouble_i, long double, int, d, -987)
 TEST_FUNCS (longdouble_d, long double, double, d, -987.0)
+#ifndef SKIP_COMPLEX
 TEST_FUNCS (complexlongdouble_i, _Complex long double, int, cd, -987)
 TEST_FUNCS (complexlongdouble_d, _Complex long double, double, cd, -987.0)
+#endif
index 9c73a1c..f6b3c1d 100644 (file)
@@ -6,14 +6,18 @@
 extern void exit (int);
 extern void longdouble_i_doit (void);
 extern void longdouble_d_doit (void);
+#ifndef SKIP_COMPLEX
 extern void complexlongdouble_i_doit (void);
 extern void complexlongdouble_d_doit (void);
+#endif
 
 int main (void)
 {
   longdouble_i_doit ();
   longdouble_d_doit ();
+#ifndef SKIP_COMPLEX
   complexlongdouble_i_doit ();
   complexlongdouble_d_doit ();
+#endif
   exit (0);
 }
index a395cb2..27aa48f 100644 (file)
@@ -1,6 +1,8 @@
 #include "scalar-by-value-x.h"
 
 extern long double d;
+#ifndef SKIP_COMPLEX
 extern _Complex long double cd;
+#endif
 
 #include "scalar-by-value-6.c"
index 87c7b23..2e9aed2 100644 (file)
@@ -1,6 +1,8 @@
 #include "scalar-by-value-y.h"
 
 long double d = 1234.0L + 0x0.abcdp-70L;
+#ifndef SKIP_COMPLEX
 _Complex long double cd = 234.0L + 0x0.abcp-70L + 567.0Li +0x0defp-70Li;
+#endif
 
 #include "scalar-by-value-6.c"
index 47a3613..e181a7e 100644 (file)
@@ -1,5 +1,14 @@
 extern void abort (void);
 
+#ifdef __GNUC__
+#define va_list __builtin_va_list
+#define va_start __builtin_va_start
+#define va_arg __builtin_va_arg
+#define va_end __builtin_va_end
+#else
+#include <stdarg.h>
+#endif
+
 #if USE_MEMCMP
 /* For comparing vectors.  */
 #define TEST_FUNCS(NAME, TYPE, PADT, VAL, VAL2) \
@@ -115,22 +124,22 @@ void NAME##_f9 (PADT z0, PADT z1, PADT z2, PADT z3, PADT z4, PADT z5,     \
                                                                        \
 void NAME##_fv (int n, ...)                                            \
 {                                                                      \
-  __builtin_va_list ap;                                                        \
+  va_list ap;                                                          \
   TYPE x;                                                              \
-  __builtin_va_start (ap, n);                                          \
+  va_start (ap, n);                                                    \
                                                                        \
   while (n-- != 0)                                                     \
-    if (__builtin_va_arg (ap, PADT) != (PADT) 0)                       \
+    if (va_arg (ap, PADT) != (PADT) 0)                                 \
       abort ();                                                                \
                                                                        \
-  x = __builtin_va_arg (ap, TYPE);                                     \
+  x = va_arg (ap, TYPE);                                               \
   if (memcmp (&x, &VAL, sizeof (x)) != 0 )                             \
     abort ();                                                          \
                                                                        \
-  if (__builtin_va_arg (ap, PADT) != VAL2)                             \
+  if (va_arg (ap, PADT) != VAL2)                                       \
     abort ();                                                          \
                                                                        \
-  __builtin_va_end (ap);                                               \
+  va_end (ap);                                                         \
 }
 
 #else
@@ -248,21 +257,21 @@ void NAME##_f9 (PADT z0, PADT z1, PADT z2, PADT z3, PADT z4, PADT z5,     \
                                                                        \
 void NAME##_fv (int n, ...)                                            \
 {                                                                      \
-  __builtin_va_list ap;                                                        \
+  va_list ap;                                                          \
                                                                        \
-  __builtin_va_start (ap, n);                                          \
+  va_start (ap, n);                                                    \
                                                                        \
   while (n-- != 0)                                                     \
-    if (__builtin_va_arg (ap, PADT) != (PADT) 0)                       \
+    if (va_arg (ap, PADT) != (PADT) 0)                                 \
       abort ();                                                                \
                                                                        \
-  if (__builtin_va_arg (ap, TYPE) != VAL)                              \
+  if (va_arg (ap, TYPE) != VAL)                                                \
     abort ();                                                          \
                                                                        \
-  if (__builtin_va_arg (ap, PADT) != VAL2)                             \
+  if (va_arg (ap, PADT) != VAL2)                                       \
     abort ();                                                          \
                                                                        \
-  __builtin_va_end (ap);                                               \
+  va_end (ap);                                                         \
 }
 
 #endif
index c153f6f..5b33ce8 100644 (file)
@@ -83,6 +83,7 @@ testit##NAME (void)                                           \
   DEBUG_NL;                                                    \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(ci, _Complex int, CINT (2, 3))
 T(cl, _Complex long, CINT (3, 4))
@@ -90,6 +91,7 @@ T(cll, _Complex long long, CINT (4, 5))
 #endif
 T(cd, _Complex double, CDBL (2.0, 3.0))
 T(cld, _Complex long double, CDBL (3.0, 4.0))
+#endif
 
 #undef T
 
@@ -100,6 +102,7 @@ DEBUG_INIT
 
 #define T(NAME) testit##NAME ();
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(ci)
 T(cl)
@@ -107,6 +110,7 @@ T(cll)
 #endif
 T(cd)
 T(cld)
+#endif
 
 DEBUG_FINI
 
index 31dddd0..245c4c5 100644 (file)
@@ -62,6 +62,7 @@ testva##NAME (int n, ...)                                     \
   return rslt;                                                 \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(ci, _Complex int, CINT (2, 3))
 T(cl, _Complex long, CINT (3, 4))
@@ -69,3 +70,4 @@ T(cll, _Complex long long, CINT (4, 5))
 #endif
 T(cd, _Complex double, CDBL (2.0, 3.0))
 T(cld, _Complex long double, CDBL (3.0, 4.0))
+#endif
index 0ea7649..50305be 100644 (file)
@@ -36,11 +36,13 @@ testit##NAME (void)                                         \
   DEBUG_NL;                                                    \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(cc, _Complex char, CINT (0, 1))
 T(cs, _Complex short, CINT (1 + 2))
 #endif
 T(cf, _Complex float, CDBL (1.0, 2.0))
+#endif
 
 #undef T
 
@@ -51,11 +53,13 @@ DEBUG_INIT
 
 #define T(NAME) testit##NAME ();
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(cc)
 T(cs)
 #endif
 T(cf)
+#endif
 
 DEBUG_FINI
 
index 175fb6c..3c96856 100644 (file)
@@ -37,8 +37,10 @@ test1##NAME (TYPE x01)                                               \
   return x01;                                                  \
 }
 
+#ifndef SKIP_COMPLEX
 #ifndef SKIP_COMPLEX_INT
 T(cc, _Complex char, CINT (0, 1))
 T(cs, _Complex short, CINT (1, 2))
 #endif
 T(cf, _Complex float, CDBL (1.0, 2.0))
+#endif
index eb99592..05e36fe 100644 (file)
@@ -4,6 +4,7 @@
 #include "fp-struct-check.h"
 #include "fp-struct-test-by-value-x.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cf, _Complex float)
 CHECKS(cf, _Complex float)
 
@@ -19,7 +20,7 @@ TEST(Scf9, _Complex float)
 TEST(Scf10, _Complex float)
 TEST(Scf11, _Complex float)
 TEST(Scf12, _Complex float)
-
+#endif
 
 #undef T
 
@@ -30,6 +31,7 @@ DEBUG_INIT
 
 #define T(TYPE, MTYPE) testit##TYPE ();
 
+#ifndef SKIP_COMPLEX
 T(Scf1, _Complex float)
 T(Scf2, _Complex float)
 T(Scf3, _Complex float)
@@ -42,7 +44,7 @@ T(Scf9, _Complex float)
 T(Scf10, _Complex float)
 T(Scf11, _Complex float)
 T(Scf12, _Complex float)
-
+#endif
 
 DEBUG_FINI
 
index 9450815..ce99a68 100644 (file)
@@ -12,6 +12,7 @@ const int test_va = 1;
 #include "fp-struct-init.h"
 #include "fp-struct-test-by-value-y.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cf,_Complex float)
 INITS(cf, _Complex float)
 
@@ -27,4 +28,4 @@ TEST(Scf9, _Complex float)
 TEST(Scf10, _Complex float)
 TEST(Scf11, _Complex float)
 TEST(Scf12, _Complex float)
-
+#endif
index 0aa4524..f563f6e 100644 (file)
@@ -4,14 +4,15 @@
 #include "fp-struct-check.h"\r
 #include "fp-struct-test-by-value-x.h"\r
 \r
+#ifndef SKIP_COMPLEX\r
 DEFS(cf, _Complex float)\r
 CHECKS(cf, _Complex float)\r
 \r
-\r
 TEST(Scf13, _Complex float)\r
 TEST(Scf14, _Complex float)\r
 TEST(Scf15, _Complex float)\r
 TEST(Scf16, _Complex float)\r
+#endif\r
 \r
 #undef T\r
 \r
@@ -22,11 +23,12 @@ DEBUG_INIT
 \r
 #define T(TYPE, MTYPE) testit##TYPE ();\r
 \r
-\r
+#ifndef SKIP_COMPLEX\r
 T(Scf13, _Complex float)\r
 T(Scf14, _Complex float)\r
 T(Scf15, _Complex float)\r
 T(Scf16, _Complex float)\r
+#endif\r
 \r
 DEBUG_FINI\r
 \r
index 2fd561e..0575b3c 100644 (file)
@@ -12,11 +12,12 @@ const int test_va = 1;
 #include "fp-struct-init.h"\r
 #include "fp-struct-test-by-value-y.h"\r
 \r
+#ifndef SKIP_COMPLEX\r
 DEFS(cf,_Complex float)\r
 INITS(cf, _Complex float)\r
 \r
-\r
 TEST(Scf13, _Complex float)\r
 TEST(Scf14, _Complex float)\r
 TEST(Scf15, _Complex float)\r
 TEST(Scf16, _Complex float)\r
+#endif\r
index 93fd788..8c27045 100644 (file)
@@ -4,6 +4,7 @@
 #include "fp-struct-check.h"
 #include "fp-struct-test-by-value-x.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cd, _Complex double)
 CHECKS(cd, _Complex double)
 
@@ -19,7 +20,7 @@ TEST(Scd9, _Complex double)
 TEST(Scd10, _Complex double)
 TEST(Scd11, _Complex double)
 TEST(Scd12, _Complex double)
-
+#endif
 
 #undef T
 
@@ -30,6 +31,7 @@ DEBUG_INIT
 
 #define T(TYPE, MTYPE) testit##TYPE ();
 
+#ifndef SKIP_COMPLEX
 T(Scd1, _Complex double)
 T(Scd2, _Complex double)
 T(Scd3, _Complex double)
@@ -42,7 +44,7 @@ T(Scd9, _Complex double)
 T(Scd10, _Complex double)
 T(Scd11, _Complex double)
 T(Scd12, _Complex double)
-
+#endif
 
 DEBUG_FINI
 
index f8ac0a7..d05ff84 100644 (file)
@@ -12,6 +12,7 @@ const int test_va = 1;
 #include "fp-struct-init.h"
 #include "fp-struct-test-by-value-y.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cd,_Complex double)
 INITS(cd, _Complex double)
 
@@ -27,4 +28,4 @@ TEST(Scd9, _Complex double)
 TEST(Scd10, _Complex double)
 TEST(Scd11, _Complex double)
 TEST(Scd12, _Complex double)
-
+#endif
index 5b2f1d1..804b5c2 100644 (file)
@@ -4,14 +4,15 @@
 #include "fp-struct-check.h"
 #include "fp-struct-test-by-value-x.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cd, _Complex double)
 CHECKS(cd, _Complex double)
 
-
 TEST(Scd13, _Complex double)
 TEST(Scd14, _Complex double)
 TEST(Scd15, _Complex double)
 TEST(Scd16, _Complex double)
+#endif
 
 #undef T
 
@@ -22,11 +23,12 @@ DEBUG_INIT
 
 #define T(TYPE, MTYPE) testit##TYPE ();
 
-
+#ifndef SKIP_COMPLEX
 T(Scd13, _Complex double)
 T(Scd14, _Complex double)
 T(Scd15, _Complex double)
 T(Scd16, _Complex double)
+#endif
 
 DEBUG_FINI
 
index d785a99..3119e54 100644 (file)
@@ -12,11 +12,12 @@ const int test_va = 1;
 #include "fp-struct-init.h"
 #include "fp-struct-test-by-value-y.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cd,_Complex double)
 INITS(cd, _Complex double)
 
-
 TEST(Scd13, _Complex double)
 TEST(Scd14, _Complex double)
 TEST(Scd15, _Complex double)
 TEST(Scd16, _Complex double)
+#endif
index f9dd6aa..aa10a6e 100644 (file)
@@ -4,6 +4,7 @@
 #include "fp-struct-check.h"
 #include "fp-struct-test-by-value-x.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cld, _Complex long double)
 CHECKS(cld, _Complex long double)
 
@@ -19,7 +20,7 @@ TEST(Scld9, _Complex long double)
 TEST(Scld10, _Complex long double)
 TEST(Scld11, _Complex long double)
 TEST(Scld12, _Complex long double)
-
+#endif
 
 #undef T
 
@@ -30,6 +31,7 @@ DEBUG_INIT
 
 #define T(TYPE, MTYPE) testit##TYPE ();
 
+#ifndef SKIP_COMPLEX
 T(Scld1, _Complex long double)
 T(Scld2, _Complex long double)
 T(Scld3, _Complex long double)
@@ -42,7 +44,7 @@ T(Scld9, _Complex long double)
 T(Scld10, _Complex long double)
 T(Scld11, _Complex long double)
 T(Scld12, _Complex long double)
-
+#endif
 
 DEBUG_FINI
 
index 8c732d5..d98debb 100644 (file)
@@ -12,6 +12,7 @@ const int test_va = 1;
 #include "fp-struct-init.h"
 #include "fp-struct-test-by-value-y.h"
 
+#ifndef SKIP_COMPLEX
 DEFS(cld,_Complex long double)
 INITS(cld, _Complex long double)
 
@@ -27,4 +28,4 @@ TEST(Scld9, _Complex long double)
 TEST(Scld10, _Complex long double)
 TEST(Scld11, _Complex long double)
 TEST(Scld12, _Complex long double)
-
+#endif
index 72f5bbf..986c4dd 100644 (file)
@@ -4,14 +4,15 @@
 #include "fp-struct-check.h"\r
 #include "fp-struct-test-by-value-x.h"\r
 \r
+#ifndef SKIP_COMPLEX\r
 DEFS(cld, _Complex long double)\r
 CHECKS(cld, _Complex long double)\r
 \r
-\r
 TEST(Scld13, _Complex long double)\r
 TEST(Scld14, _Complex long double)\r
 TEST(Scld15, _Complex long double)\r
 TEST(Scld16, _Complex long double)\r
+#endif\r
 \r
 #undef T\r
 \r
@@ -22,11 +23,12 @@ DEBUG_INIT
 \r
 #define T(TYPE, MTYPE) testit##TYPE ();\r
 \r
-\r
+#ifndef SKIP_COMPLEX\r
 T(Scld13, _Complex long double)\r
 T(Scld14, _Complex long double)\r
 T(Scld15, _Complex long double)\r
 T(Scld16, _Complex long double)\r
+#endif\r
 \r
 DEBUG_FINI\r
 \r
index 545dcf8..12ac534 100644 (file)
@@ -12,11 +12,12 @@ const int test_va = 1;
 #include "fp-struct-init.h"\r
 #include "fp-struct-test-by-value-y.h"\r
 \r
+#ifndef SKIP_COMPLEX\r
 DEFS(cld,_Complex long double)\r
 INITS(cld, _Complex long double)\r
 \r
-\r
 TEST(Scld13, _Complex long double)\r
 TEST(Scld14, _Complex long double)\r
 TEST(Scld15, _Complex long double)\r
 TEST(Scld16, _Complex long double)\r
+#endif\r
index 7f005ef..1fd2eba 100644 (file)
@@ -4,13 +4,17 @@
    the former doesn't.
    See http://gcc.gnu.org/ml/gcc-patches/2003-01/msg01830.html */
 
+#ifndef SKIP_VLA_IN_STRUCT
 extern void struct_by_value_22_x (void);
+#endif
 extern void exit (int);
 int fails;
 
 int
 main ()
 {
+#ifndef SKIP_VLA_IN_STRUCT
   struct_by_value_22_x ();
+#endif
   exit (0);
 }
index fa71a9e..6f1cdc8 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef SKIP_VLA_IN_STRUCT
+
 #ifndef T
 #include "compat-common.h"
 #include "mixed-struct-defs.h"
@@ -77,3 +79,5 @@ U(Sfiifii)
 #undef U
 
 #endif
+
+#endif
index 079e40e..ea5dec2 100644 (file)
@@ -9,6 +9,7 @@ const int test_va = 0;
 const int test_va = 1;
 #endif
 
+#ifndef SKIP_VLA_IN_STRUCT
 #define T(NAME, FIELDS, TYPE, FIELDINIT, FIELDTEST)                    \
 void                                                                   \
 testva##NAME (int n, ...)                                              \
@@ -37,3 +38,4 @@ testva##NAME (int n, ...)                                             \
 }
 
 #include "struct-by-value-22_x.c"
+#endif
index decc676..8426787 100644 (file)
@@ -214,9 +214,11 @@ typedef _Decimal32 TDecimal32;
 typedef _Decimal64 TDecimal64;
 typedef _Decimal128 TDecimal128;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Tcfloat;
 typedef _Complex double Tcdouble;
 typedef _Complex long double Tcldouble;
+#endif
 typedef bool Tbool;
 typedef enum E0 TE0;
 typedef enum E1 TE1;
@@ -263,9 +265,11 @@ typedef _Decimal32 TalDecimal32 atal;
 typedef _Decimal64 TalDecimal64 atal;
 typedef _Decimal128 TalDecimal128 atal;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Talcfloat atal;
 typedef _Complex double Talcdouble atal;
 typedef _Complex long double Talcldouble atal;
+#endif
 typedef bool Talbool atal;
 typedef enum E0 TalE0 atal;
 typedef enum E1 TalE1 atal;
@@ -312,9 +316,11 @@ typedef _Decimal32 Tal1Decimal32 atal1;
 typedef _Decimal64 Tal1Decimal64 atal1;
 typedef _Decimal128 Tal1Decimal128 atal1;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Tal1cfloat atal1;
 typedef _Complex double Tal1cdouble atal1;
 typedef _Complex long double Tal1cldouble atal1;
+#endif
 typedef bool Tal1bool atal1;
 typedef enum E0 Tal1E0 atal1;
 typedef enum E1 Tal1E1 atal1;
@@ -361,9 +367,11 @@ typedef _Decimal32 Tal2Decimal32 atal2;
 typedef _Decimal64 Tal2Decimal64 atal2;
 typedef _Decimal128 Tal2Decimal128 atal2;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Tal2cfloat atal2;
 typedef _Complex double Tal2cdouble atal2;
 typedef _Complex long double Tal2cldouble atal2;
+#endif
 typedef bool Tal2bool atal2;
 typedef enum E0 Tal2E0 atal2;
 typedef enum E1 Tal2E1 atal2;
@@ -410,9 +418,11 @@ typedef _Decimal32 Tal4Decimal32 atal4;
 typedef _Decimal64 Tal4Decimal64 atal4;
 typedef _Decimal128 Tal4Decimal128 atal4;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Tal4cfloat atal4;
 typedef _Complex double Tal4cdouble atal4;
 typedef _Complex long double Tal4cldouble atal4;
+#endif
 typedef bool Tal4bool atal4;
 typedef enum E0 Tal4E0 atal4;
 typedef enum E1 Tal4E1 atal4;
@@ -459,9 +469,11 @@ typedef _Decimal32 Tal8Decimal32 atal8;
 typedef _Decimal64 Tal8Decimal64 atal8;
 typedef _Decimal128 Tal8Decimal128 atal8;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Tal8cfloat atal8;
 typedef _Complex double Tal8cdouble atal8;
 typedef _Complex long double Tal8cldouble atal8;
+#endif
 typedef bool Tal8bool atal8;
 typedef enum E0 Tal8E0 atal8;
 typedef enum E1 Tal8E1 atal8;
@@ -508,9 +520,11 @@ typedef _Decimal32 Tal16Decimal32 atal16;
 typedef _Decimal64 Tal16Decimal64 atal16;
 typedef _Decimal128 Tal16Decimal128 atal16;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Tal16cfloat atal16;
 typedef _Complex double Tal16cdouble atal16;
 typedef _Complex long double Tal16cldouble atal16;
+#endif
 typedef bool Tal16bool atal16;
 typedef enum E0 Tal16E0 atal16;
 typedef enum E1 Tal16E1 atal16;
@@ -557,9 +571,11 @@ typedef _Decimal32 Talx1Decimal32 atalx1;
 typedef _Decimal64 Talx1Decimal64 atalx1;
 typedef _Decimal128 Talx1Decimal128 atalx1;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Talx1cfloat atalx1;
 typedef _Complex double Talx1cdouble atalx1;
 typedef _Complex long double Talx1cldouble atalx1;
+#endif
 typedef bool Talx1bool atalx1;
 typedef enum E0 Talx1E0 atalx1;
 typedef enum E1 Talx1E1 atalx1;
@@ -603,9 +619,11 @@ typedef _Decimal32 Talx2Decimal32 atalx2;
 typedef _Decimal64 Talx2Decimal64 atalx2;
 typedef _Decimal128 Talx2Decimal128 atalx2;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Talx2cfloat atalx2;
 typedef _Complex double Talx2cdouble atalx2;
 typedef _Complex long double Talx2cldouble atalx2;
+#endif
 typedef enum E0 Talx2E0 atalx2;
 typedef enum E1 Talx2E1 atalx2;
 typedef enum E2 Talx2E2 atalx2;
@@ -643,9 +661,11 @@ typedef _Decimal32 Talx4Decimal32 atalx4;
 typedef _Decimal64 Talx4Decimal64 atalx4;
 typedef _Decimal128 Talx4Decimal128 atalx4;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Talx4cfloat atalx4;
 typedef _Complex double Talx4cdouble atalx4;
 typedef _Complex long double Talx4cldouble atalx4;
+#endif
 typedef enum E0 Talx4E0 atalx4;
 typedef enum E1 Talx4E1 atalx4;
 typedef enum E2 Talx4E2 atalx4;
@@ -677,9 +697,11 @@ typedef long double Talx8ldouble atalx8;
 typedef _Decimal64 Talx8Decimal64 atalx8;
 typedef _Decimal128 Talx8Decimal128 atalx8;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex float Talx8cfloat atalx8;
 typedef _Complex double Talx8cdouble atalx8;
 typedef _Complex long double Talx8cldouble atalx8;
+#endif
 typedef void *Taly8ptr ataly8;
 typedef char *Taly8cptr ataly8;
 typedef int *Taly8iptr ataly8;
@@ -689,8 +711,10 @@ typedef _Complex unsigned long int Taly16culong ataly16;
 typedef _Complex long long int Talx16cllong atalx16;
 typedef _Complex unsigned long long int Talx16cullong atalx16;
 #endif
+#ifndef SKIP_COMPLEX
 typedef _Complex double Talx16cdouble atalx16;
 typedef _Complex long double Talx16cldouble atalx16;
+#endif
 typedef int (*Tfnptr) (void);
 
 /* Bitfield macros.  In C, it is invalid to use numbers larger
index ce923b7..5356273 100644 (file)
@@ -65,19 +65,19 @@ proc compat_setup_dfp { } {
     global compat_have_dfp
 
     verbose "compat_setup_dfp: $compat_use_alt $compat_same_alt" 2
-    set compat_have_dfp 1
+
+    # Does the compiler under test support decimal float types?
+    compat-use-tst-compiler
+    set compat_have_dfp [check_effective_target_dfprt_nocache]
+    verbose "compat_have_dfp for tst compiler: $compat_have_dfp" 2
+
     # If there is an alternate compiler, does it support decimal float types?
-    if { $compat_use_alt == 1 && $compat_same_alt == 0 } {
+    if { $compat_have_dfp == 1 && $compat_use_alt == 1 && $compat_same_alt == 0 } {
        compat-use-alt-compiler
        set compat_have_dfp [check_effective_target_dfprt_nocache]
        compat-use-tst-compiler
        verbose "compat_have_dfp for alt compiler: $compat_have_dfp" 2
     }
-    # Does the compiler under test support it?
-    if { $compat_have_dfp == 1 } {
-       set compat_have_dfp [check_effective_target_dfprt_nocache]
-       verbose "compat_have_dfp for tst compiler: $compat_have_dfp" 2
-    }
 
     # If decimal float is not supported, add it to the skip list, which
     # affects code in the header files.
index e8ca8fc..e1af1b0 100644 (file)
@@ -51,8 +51,11 @@ set option_list $COMPAT_OPTIONS
 
 # Subsets of tests can be selectively disabled by members of this list:
 #  - ATTRIBUTE: disable all tests using the __attribute__ extension,
+#  - COMPLEX: disable all tests using the complex types feature,
 #  - COMPLEX_INT: disable all tests using the complex integral types extension,
 #  - VA: disable all tests using the variable number of arguments feature,
+#  - VLA_IN_STRUCT: disable all tests using the variable-length arrays as
+#    structure members extension,
 #  - ZERO_ARRAY: disable all tests using the zero-sized arrays extension.
 # The default skip lists can be overriden by
 # COMPAT_SKIPS="[list {skip_1}...{skip_n}]"