]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
filter2_x.C: Declare abort.
authorDaniel Jacobowitz <dan@codesourcery.com>
Tue, 9 Sep 2008 03:17:22 +0000 (03:17 +0000)
committerDaniel Jacobowitz <drow@gcc.gnu.org>
Tue, 9 Sep 2008 03:17:22 +0000 (03:17 +0000)
* 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.

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>
From-SVN: r140137

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 138351adc3f87c89dcd4f80a0d09a7831564737f..e5ee8233db0a0ff487425868340aa798eada3814 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 cdbfffffdd1578b3e13ddd708ad6422e5d9b567c..287ffc7bd89dbe4983aad87c0271a26fe7697f93 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 4ca3be0af9010af83c2441472f553294a681fefe..1212871708947472ccc217a0643a42871617e0f7 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 c448cbed8d24aa140116edaf3d4751977744474d..fbe0e214591d91b0134b9ed3cf0a93fb0db33633 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 635e7446d7600ed02c6c222c11689f72026e953b..40d4e08f9f179c7efaa7767724ba19eae4677bf6 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 6f550b4baec434d81050cf8a0e3640f07be30487..e63f5fd389f5b32ca98256796e88e728a2704a57 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 1e12cc92c625d55e0e10f10a21c1adeccab36b97..d470ef605dae9dddd59792c2c0d28f3f58507e55 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 adc8ece569062a7eb7df52089fa1013959a33ff1..a4e73c9fdb6267a7793774a405322a6bedc5df8a 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 0db32ab53c97746eb0f2df412488197b9e08e8eb..e0fa7053996f6f310f0dbdb8da2281a88e8f373f 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 1fa713d2b6417e974d32397c8a83c63ed67ed709..1c336d81ab52be098fa3d88f255856187d246dda 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 c57c6fee42d269c0862c4d29c31205bdb097dc34..d29597e3d04be914fc85745373910057ea9614e9 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 ();
@@ -25,6 +26,7 @@ int main (void)
 #ifndef SKIP_COMPLEX_INT
   complexlonglong_i_doit ();
   complexlonglong_d_doit ();
+#endif
 #endif
   exit (0);
 }
index 54c5d9b70020906861285bc1d38f093763c16cb8..af65398f71e4f7d043e2f43618b178b15e529871 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 9c73a1caca1abbff37fcb10b0fea2f0fd21a3fbe..f6b3c1d8a8ee34d063836e570a527927667f02de 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 a395cb207fa36fc6831c7792d8e4e826f7642d52..27aa48fbe83199a078f55b4a01800fa080403314 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 87c7b234a8223ea0e11ebb28908e050f1b0c218f..2e9aed2821ffffa0cad92f31590cd83330ce834a 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 47a3613350733f4309f890236ac059482839d423..e181a7e34e5d32cb17c2189c4b5031b9e91e7e96 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 c153f6f19dfcd92ee0996f9908e0b9a2d71804f7..5b33ce880334eba2814fc8eb5aaf7b90022c4533 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 31dddd0a033f950006e88fcb6a5d2bb82b46afcd..245c4c571bc36522c213901c5813e9962a998dfe 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 0ea764958d003d898f1dd706c86364667c062f3a..50305be4d351acd6520693efe6eb7cd5080ceca0 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 175fb6ccb50b0304581a3213c8f66e5946fd5c4b..3c96856975f24b9d518348de54202b35208e19ae 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 eb9959214679bba712324bf1de19188a0bbc46bf..05e36fe26c0640f4d31e33f3bcb8922e80e7f984 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 9450815e74cf607e67095ba2eff06addfd8e3d85..ce99a68a0c86f34d376c1ba41773caa5579ccd77 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 0aa45249590fa2eb61558c38203fd089257fd1c3..f563f6ea91b480cfba287bf241854f8827b31d6a 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 2fd561ef0449485c5712b4581714f2ef0d7c2f8b..0575b3c1d81ebfefde154a4299f4ec44d59ee128 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 93fd788ea4544983a3c18b4701ea98c64305e764..8c2704522436a6780f1a620a941b8e8379965064 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 f8ac0a7c15e36c31157a9efe8ae2385a539691c9..d05ff84075a85dfb2abff0c2f46dab2867d0a4b5 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 5b2f1d1d920a88acd3dde28055b658f224f9ce3e..804b5c255658c9f15e7936bd3c23d58d5d4b8163 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 d785a999d580de38c3a2e489f2ee6fba1a694ec1..3119e54480d0394987346c369a0b587063c896ad 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 f9dd6aa0b72bc3ef65e2a2a31d9f2642a741abf8..aa10a6e1a1a2d811b4d8a5bb514711b766fd3d21 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 8c732d58273d3754f43f1af86dc9a00fcf0f00ed..d98debb6df7413b5caac70cd872456ac8261ceb7 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 72f5bbf5d44d6653265c1db3e342cbf37169faad..986c4dded093a82220a123cbb934030d78be990b 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 545dcf8970f4cfd236e295a4375b93ff00312c13..12ac5341826a88ab5e2a80be9b6bcd0749f472a4 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 7f005ef0d885a646af20fc6eeff59415101953f5..1fd2eba1c7fd8c817b1e8d5c947a5c0e9c118bec 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 fa71a9edd3c2c588146dca2087d15530f70770bb..6f1cdc86014dc4ef17ba33eacb9537a73c86f22f 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 079e40e5f897a920bd37e5c1074f4cd7e383b215..ea5dec2268ea5d33377699abbfe07722ad3424ec 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 decc67694212c46ce5bd6a0cf7e325ea1d6767b7..8426787b68f9417a78859b415a8d17d7c6625f3c 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 ce923b754ba636e9416fad162484b7b8b6920b89..53562731b54780458cb0af02accd2e66fea6a60e 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 e8ca8fc79875ab9b2a42cc2b35ff5a953748b4a0..e1af1b039e669c1d2a45f41f98a9c601c326f1c6 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}]"