aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/compat
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/compat')
-rw-r--r--gcc/testsuite/gcc.dg/compat/compat-common.h15
-rw-r--r--gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/generate-random.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-check.h9
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h5
-rw-r--r--gcc/testsuite/gcc.dg/compat/mixed-struct-init.h9
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c15
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c11
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c17
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c12
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c11
-rw-r--r--gcc/testsuite/gcc.dg/compat/sdata-section.h4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-1.h2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-1_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-1_y.c2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-2.h2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-2_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-align-2_y.c8
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c5
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c12
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c9
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c12
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c9
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c59
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c34
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c59
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c34
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c14
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c59
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c34
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c8
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c7
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c8
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c7
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c23
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-10_x.c24
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-10_y.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-19_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-20_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-2_x.c15
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-2_y.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-return-3_x.c3
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-1_x.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-1_y.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-2_x.c6
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-2_y.c4
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-check.h2
-rw-r--r--gcc/testsuite/gcc.dg/compat/vector-defs.h68
74 files changed, 360 insertions, 480 deletions
diff --git a/gcc/testsuite/gcc.dg/compat/compat-common.h b/gcc/testsuite/gcc.dg/compat/compat-common.h
index 95b945fae41..c2664acbd19 100644
--- a/gcc/testsuite/gcc.dg/compat/compat-common.h
+++ b/gcc/testsuite/gcc.dg/compat/compat-common.h
@@ -24,5 +24,20 @@
#define DEBUG_FINI
#endif
+#ifdef __GNUC__
+#define CINT(x, y) (x + __extension__ y##i)
+#define CDBL(x, y) (x + __extension__ y##i)
+#else
+#ifdef __SUNPRO_C
+/* ??? Complex support without <complex.h>. */
+#else
+#include <complex.h>
+#endif
+#ifndef SKIP_COMPLEX_INT
+#define CINT(x, y) ((_Complex int) (x + y * _Complex_I))
+#endif
+#define CDBL(x, y) (x + y * _Complex_I)
+#endif
+
extern void abort (void);
extern int fails;
diff --git a/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c b/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c
index 80f4fbcce1e..156a417a48b 100644
--- a/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/fnptr-by-value-1_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/generate-random.c b/gcc/testsuite/gcc.dg/compat/generate-random.c
index 00c422493da..cce21853a59 100644
--- a/gcc/testsuite/gcc.dg/compat/generate-random.c
+++ b/gcc/testsuite/gcc.dg/compat/generate-random.c
@@ -175,8 +175,8 @@ static struct generate_random_data unsafe_state =
in the initialization of randtbl) because the state table pointer is set
to point to randtbl[1] (as explained below).) */
- &randtbl[SEP_3 + 1], /* fptr */
- &randtbl[1], /* rptr */
+ .fptr = &randtbl[SEP_3 + 1],
+ .rptr = &randtbl[1],
/* The following things are the pointer to the state information table,
the type of the current generator, the degree of the current polynomial
@@ -188,13 +188,13 @@ static struct generate_random_data unsafe_state =
indexing every time to find the address of the last element to see if
the front and rear pointers have wrapped. */
- &randtbl[1], /* state */
+ .state = &randtbl[1],
- TYPE_3, /* rand_type */
- DEG_3, /* rand_deg */
- SEP_3, /* rand_sep */
+ .rand_type = TYPE_3,
+ .rand_deg = DEG_3,
+ .rand_sep = SEP_3,
- &randtbl[sizeof (randtbl) / sizeof (randtbl[0])] /* end_ptr */
+ .end_ptr = &randtbl[sizeof (randtbl) / sizeof (randtbl[0])]
};
/* Initialize the random number generator based on the given seed. If the
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
index dae20507c2f..248ffb215f8 100644
--- a/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-check.h
@@ -26,3 +26,12 @@ void checkScssdss (Scssdss x, int i)
void checkScssdssc (Scssdssc x, int i)
{ if (x.c != (char)i || x.ssds.sd.d != (double)i+1
|| x.b != (char)i+2) DEBUG_CHECK }
+
+void checkSfi (Sfi x, int i)
+{ if (x.f != (float)i || x.i != i+1) DEBUG_CHECK }
+void checkSfii (Sfii x, int i)
+{ if (x.f != (float)i || x.i1 != i+1 || x.i2 != i+2) DEBUG_CHECK }
+void checkSfifi (Sfifi x, int i)
+{ if (x.fi.f != (float)i || x.fi.i != i+1) DEBUG_CHECK }
+void checkSfiifii (Sfiifii x, int i)
+{ if (x.fii.f != (float)i || x.fii.i1 != i+1 || x.fii.i2 != i+2) DEBUG_CHECK }
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h
index 6b8f4e721e3..9a313790f68 100644
--- a/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-defs.h
@@ -12,3 +12,8 @@ typedef struct { Sd sd; } Ssds;
typedef struct { Sd sd; char c; } Ssdsc;
typedef struct { char c; Ssds ssds; } Scssdss;
typedef struct { char c; Ssds ssds; char b; } Scssdssc;
+
+typedef struct { float f; int i; } Sfi;
+typedef struct { float f; int i1; int i2; } Sfii;
+typedef struct { float f; int i; Sfi fi; } Sfifi;
+typedef struct { float f; int i1; int i2; Sfii fii; } Sfiifii;
diff --git a/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h b/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h
index 7a118cce1a1..b11fc240451 100644
--- a/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h
+++ b/gcc/testsuite/gcc.dg/compat/mixed-struct-init.h
@@ -24,3 +24,12 @@ void initScssdss (Scssdss *p, int i)
{ p->c = (char)i; p->ssds.sd.d = (double)i+1; }
void initScssdssc (Scssdssc *p, int i)
{ p->c = (char)i; p->ssds.sd.d = (double)i+1; p->b = (char)i+2; }
+
+void initSfi (Sfi *x, int i)
+{ x->f = (float)i; x->i = i+1; }
+void initSfii (Sfii *x, int i)
+{ x->f = (float)i; x->i1 = i+1; x->i2 = i+2; }
+void initSfifi (Sfifi *x, int i)
+{ x->fi.f = (float)i; x->fi.i = i+1; }
+void initSfiifii (Sfiifii *x, int i)
+{ x->fii.f = (float)i; x->fii.i1 = i+1; x->fii.i2 = i+2; }
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c
index 7b4b60ea77f..73f3de0e2e7 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-1_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
index 25bb389d0c1..6f550b4baec 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_x.c
@@ -144,11 +144,13 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (5,6))
-T(cd, _Complex double, (7.0,8.0))
-T(cld, _Complex long double, (8.0,9.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 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))
#undef T
@@ -159,9 +161,11 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(ci)
T(cl)
T(cll)
+#endif
T(cd)
T(cld)
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
index 35354c0f7b5..1e12cc92c62 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-3_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -85,8 +84,10 @@ testva##NAME (int n, ...) \
} \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (5,6))
-T(cd, _Complex double, (7.0,8.0))
-T(cld, _Complex long double, (8.0,9.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 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))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
index 8231950c6ef..adc8ece5690 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_x.c
@@ -68,9 +68,11 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (6.0,7.0))
+#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))
#undef T
@@ -81,8 +83,10 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(cc)
T(cs)
+#endif
T(cf)
DEBUG_FINI
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
index fdf5b24e5ba..0db32ab53c9 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-by-value-4_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -68,6 +67,8 @@ test##NAME (TYPE x01, TYPE x02, TYPE x03, TYPE x04, \
check##NAME (x16, 16); \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (6.0,7.0))
+#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))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c
index 6525e5e5666..5556f9510a3 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-1_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c
index 1f7d5493836..485165c716b 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-2_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
index 9dceccdd890..c153f6f19df 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-3_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -84,11 +83,13 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (4,5))
-T(cd, _Complex double, (2.0,3.0))
-T(cld, _Complex long double, (3.0,4.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 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))
#undef T
@@ -99,9 +100,11 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(ci)
T(cl)
T(cll)
+#endif
T(cd)
T(cld)
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
index 564866dd223..31dddd0a033 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-3_y.c
@@ -62,8 +62,10 @@ testva##NAME (int n, ...) \
return rslt; \
}
-T(ci, _Complex int, (2,3))
-T(cl, _Complex long, (3,4))
-T(cll, _Complex long long, (4,5))
-T(cd, _Complex double, (2.0,3.0))
-T(cld, _Complex long double, (3.0,4.0))
+#ifndef SKIP_COMPLEX_INT
+T(ci, _Complex int, CINT (2, 3))
+T(cl, _Complex long, CINT (3, 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))
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c b/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
index c3b31f8c9bf..0ea764958d0 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-4_x.c
@@ -36,9 +36,11 @@ testit##NAME (void) \
DEBUG_NL; \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (1.0,2.0))
+#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))
#undef T
@@ -49,8 +51,10 @@ DEBUG_INIT
#define T(NAME) testit##NAME ();
+#ifndef SKIP_COMPLEX_INT
T(cc)
T(cs)
+#endif
T(cf)
DEBUG_FINI
diff --git a/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c b/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
index 5ac68b5cc0f..175fb6ccb50 100644
--- a/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/scalar-return-4_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -38,6 +37,8 @@ test1##NAME (TYPE x01) \
return x01; \
}
-T(cc, _Complex char, (0,1))
-T(cs, _Complex short, (1,2))
-T(cf, _Complex float, (1.0,2.0))
+#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))
diff --git a/gcc/testsuite/gcc.dg/compat/sdata-section.h b/gcc/testsuite/gcc.dg/compat/sdata-section.h
index d2bde8066ef..15be8438662 100644
--- a/gcc/testsuite/gcc.dg/compat/sdata-section.h
+++ b/gcc/testsuite/gcc.dg/compat/sdata-section.h
@@ -1,5 +1,7 @@
-#ifdef __mips
+#if defined (__mips) && !defined(SKIP_ATTRIBUTE)
#define SDATA_SECTION __attribute__((__section__(".sdata")))
#else
#define SDATA_SECTION
#endif
+
+extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-1.h b/gcc/testsuite/gcc.dg/compat/struct-align-1.h
index 5283e786f5b..d9006c74159 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-1.h
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-1.h
@@ -27,6 +27,7 @@ struct B3_orig {
struct A3_orig a3;
};
+#ifndef SKIP_ATTRIBUTE
#define DESC_p_all "packed attribute for all"
struct B1_p_all {
char c;
@@ -176,3 +177,4 @@ struct B3_m_inner_p_outer {
char c;
struct A3_m_inner_p_outer a3;
} __attribute__ ((packed));
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c b/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c
index 1500fa75705..6b99ceb002f 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-1_x.c
@@ -64,12 +64,14 @@ return3_##NAME (void) \
#define CHECK(NAME) test_##NAME()
SETUP (orig, 49, 1.0, 111111)
+#ifndef SKIP_ATTRIBUTE
SETUP (p_all, 50, 2.0, 222222)
SETUP (p_inner, 51, 3.0, 333333)
SETUP (p_outer, 52, 4.0, 444444)
SETUP (a_max, 53, 5.0, 555555)
SETUP (m_outer_p_inner, 54, 6.0, 666666)
SETUP (m_inner_p_outer, 55, 7.0, 777777)
+#endif
void
struct_align_1_x (void)
@@ -77,12 +79,14 @@ struct_align_1_x (void)
DEBUG_INIT
CHECK (orig);
+#ifndef SKIP_ATTRIBUTE
CHECK (p_all);
CHECK (p_inner);
CHECK (p_outer);
CHECK (a_max);
CHECK (m_outer_p_inner);
CHECK (m_inner_p_outer);
+#endif
DEBUG_FINI
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c b/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c
index 744f4de6f28..c858e10d763 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-1_y.c
@@ -80,9 +80,11 @@ test_##NAME (void) \
}
TEST (orig)
+#ifndef SKIP_ATTRIBUTE
TEST (p_all)
TEST (p_inner)
TEST (p_outer)
TEST (a_max)
TEST (m_outer_p_inner)
TEST (m_inner_p_outer)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-2.h b/gcc/testsuite/gcc.dg/compat/struct-align-2.h
index c97a476c3c4..f94fe57e134 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-2.h
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-2.h
@@ -11,6 +11,7 @@ struct epoll_event_orig {
unsigned long long data;
};
+#ifndef SKIP_ATTRIBUTE
#define DESC_structmax "maximum useful struct alignment"
struct epoll_event_structmax {
unsigned int events;
@@ -71,3 +72,4 @@ struct epoll_event_pdata8 {
unsigned int events;
unsigned long long data __attribute__ ((aligned(8)));
} __attribute__ ((packed));
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c
index e59cec3f1eb..2a4ae586b76 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-2_x.c
@@ -1,6 +1,8 @@
/* Disable this test for 16-bit targets. */
-#if __INT_MAX__ > 32767
+#include <limits.h>
+
+#if !(defined __GNUC__) || (INT_MAX > 32767)
#include "compat-common.h"
#include "struct-align-2.h"
@@ -38,6 +40,7 @@ return_##NAME (void) \
test_##NAME()
SETUP (orig,101, 102, 0x0101010101010101ULL)
+#ifndef SKIP_ATTRIBUTE
SETUP (structmax, 103, 104, 0x1212121212121212ULL)
SETUP (struct4, 105, 106, 0x2323232323232323ULL)
SETUP (struct8, 107, 108, 0x3434343434343434ULL)
@@ -48,6 +51,7 @@ SETUP (pstruct4, 115, 116, 0x7878787878787878ULL)
SETUP (pstruct8, 117, 118, 0x8989898989898989ULL)
SETUP (pdata4, 119, 120, 0x9A9A9A9A9A9A9A9AULL)
SETUP (pdata8, 121, 122, 0xABABABABABABABABULL)
+#endif
void
struct_align_2_x (void)
@@ -55,6 +59,7 @@ struct_align_2_x (void)
DEBUG_INIT
CHECK (orig);
+#ifndef SKIP_ATTRIBUTE
CHECK (structmax);
CHECK (struct4);
CHECK (struct8);
@@ -65,6 +70,7 @@ struct_align_2_x (void)
CHECK (pstruct8);
CHECK (pdata4);
CHECK (pdata8);
+#endif
DEBUG_FINI
@@ -76,4 +82,4 @@ struct_align_2_x (void)
void struct_align_2_x (void) {}
-#endif /* __INT_MAX__ */
+#endif /* INT_MAX */
diff --git a/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c
index 0a5ec6ef31d..0ca2e40c4c1 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-align-2_y.c
@@ -1,6 +1,8 @@
/* Disable this test for 16-bit targets. */
-#if __INT_MAX__ > 32767
+#include <limits.h>
+
+#if !(defined __GNUC__) || (INT_MAX > 32767)
#include "compat-common.h"
#include "struct-align-2.h"
@@ -51,6 +53,7 @@ test_##NAME (void) \
}
TEST (orig)
+#ifndef SKIP_ATTRIBUTE
TEST (structmax)
TEST (struct4)
TEST (struct8)
@@ -61,9 +64,10 @@ TEST (pstruct4)
TEST (pstruct8)
TEST (pdata4)
TEST (pdata8)
+#endif
#else
int i; /* prevent compiling an empty file */
-#endif /* __INT_MAX__ */
+#endif /* INT_MAX */
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c
index 30ad45fe7b6..6c9589d029d 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-10_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
index b9be4f3b968..cea1ac09688 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cc, _Complex char)
CHECKS(cc, _Complex char)
@@ -23,12 +24,14 @@ TEST(Scc13, _Complex char)
TEST(Scc14, _Complex char)
TEST(Scc15, _Complex char)
TEST(Scc16, _Complex char)
+#endif
#undef T
void
struct_by_value_11_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
index c0f0ad528af..c4e47fc3549 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cc,_Complex char)
INITS(cc, _Complex char)
@@ -32,3 +32,4 @@ TEST(Scc13, _Complex char)
TEST(Scc14, _Complex char)
TEST(Scc15, _Complex char)
TEST(Scc16, _Complex char)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
index 6f943b75fe0..925ce9270b9 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cs, _Complex short)
CHECKS(cs, _Complex short)
@@ -23,12 +24,14 @@ TEST(Scs13, _Complex short)
TEST(Scs14, _Complex short)
TEST(Scs15, _Complex short)
TEST(Scs16, _Complex short)
+#endif
#undef T
void
struct_by_value_12_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
index 50a08b467af..2e8e393eeee 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cs,_Complex short)
INITS(cs, _Complex short)
@@ -32,3 +32,4 @@ TEST(Scs13, _Complex short)
TEST(Scs14, _Complex short)
TEST(Scs15, _Complex short)
TEST(Scs16, _Complex short)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
index 4418522d342..f27222f2df6 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(ci, _Complex int)
CHECKS(ci, _Complex int)
@@ -23,12 +24,14 @@ TEST(Sci13, _Complex int)
TEST(Sci14, _Complex int)
TEST(Sci15, _Complex int)
TEST(Sci16, _Complex int)
+#endif
#undef T
void
struct_by_value_13_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
index e53ee59fc43..7a3657e0f01 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(ci,_Complex int)
INITS(ci, _Complex int)
@@ -32,3 +32,4 @@ TEST(Sci13, _Complex int)
TEST(Sci14, _Complex int)
TEST(Sci15, _Complex int)
TEST(Sci16, _Complex int)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
index e5dbe736a12..bb8db70721e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cl, _Complex long)
CHECKS(cl, _Complex long)
@@ -23,12 +24,14 @@ TEST(Scl13, _Complex long)
TEST(Scl14, _Complex long)
TEST(Scl15, _Complex long)
TEST(Scl16, _Complex long)
+#endif
#undef T
void
struct_by_value_14_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
index 640b11bb06d..5abd063ef21 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cl,_Complex long)
INITS(cl, _Complex long)
@@ -32,3 +32,4 @@ TEST(Scl13, _Complex long)
TEST(Scl14, _Complex long)
TEST(Scl15, _Complex long)
TEST(Scl16, _Complex long)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
index 213568ab40a..4409c9668dc 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
@@ -4,6 +4,7 @@
#include "fp-struct-check.h"
#include "fp-struct-test-by-value-x.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cll, _Complex long long)
CHECKS(cll, _Complex long long)
@@ -23,12 +24,14 @@ TEST(Scll13, _Complex long long)
TEST(Scll14, _Complex long long)
TEST(Scll15, _Complex long long)
TEST(Scll16, _Complex long long)
+#endif
#undef T
void
struct_by_value_15_x ()
{
+#ifndef SKIP_COMPLEX_INT
DEBUG_INIT
#define T(TYPE, MTYPE) testit##TYPE ();
@@ -56,4 +59,5 @@ if (fails != 0)
abort ();
#undef T
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
index e7cf60a2d45..a5fec4fdb6e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -13,6 +12,7 @@ const int test_va = 1;
#include "fp-struct-init.h"
#include "fp-struct-test-by-value-y.h"
+#ifndef SKIP_COMPLEX_INT
DEFS(cll,_Complex long long)
INITS(cll, _Complex long long)
@@ -32,3 +32,4 @@ TEST(Scll13, _Complex long long)
TEST(Scll14, _Complex long long)
TEST(Scll15, _Complex long long)
TEST(Scll16, _Complex long long)
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
index 9aa8c3f33a0..273d7cc4f3e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
index f8e1a6aca06..a0342a37c0c 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
index 662419326b9..b69425a5f4e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c
index 8b0f1e8f70f..036c6b618d7 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-19_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c
index 692af0d2b45..67ac16d1d15 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_x.c
@@ -34,7 +34,10 @@ testit##N (void) \
extern void abort (void);
-T(0) T(1) T(2) T(3) T(4) T(5) T(6) T(7)
+#ifndef SKIP_ZERO_ARRAY
+T(0)
+#endif
+T(1) T(2) T(3) T(4) T(5) T(6) T(7)
T(8) T(9) T(10) T(11) T(12) T(13) T(14) T(15)
T(16) T(17) T(18) T(19) T(20) T(21) T(22) T(23)
T(24) T(25) T(26) T(27) T(28) T(29) T(30) T(31)
@@ -50,7 +53,10 @@ struct_by_value_1_x ()
{
#define T(N) testit##N ();
-T(0) T(1) T(2) T(3) T(4) T(5) T(6) T(7)
+#ifndef SKIP_ZERO_ARRAY
+T(0)
+#endif
+T(1) T(2) T(3) T(4) T(5) T(6) T(7)
T(8) T(9) T(10) T(11) T(12) T(13) T(14) T(15)
T(16) T(17) T(18) T(19) T(20) T(21) T(22) T(23)
T(24) T(25) T(26) T(27) T(28) T(29) T(30) T(31)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c
index 72eb05a647f..8370dbac342 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-1_y.c
@@ -30,7 +30,10 @@ test##N (struct S##N s1, struct S##N s2, \
check##N (s3, 192); \
}
-T(0) T(1) T(2) T(3) T(4) T(5) T(6) T(7)
+#ifndef SKIP_ZERO_ARRAY
+T(0)
+#endif
+T(1) T(2) T(3) T(4) T(5) T(6) T(7)
T(8) T(9) T(10) T(11) T(12) T(13) T(14) T(15)
T(16) T(17) T(18) T(19) T(20) T(21) T(22) T(23)
T(24) T(25) T(26) T(27) T(28) T(29) T(30) T(31)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c
index 6e02e7d0a00..1a4a6775def 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-20_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c
index 48bb0b70675..57c6da0c0bb 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_x.c
@@ -105,7 +105,9 @@ testit##NAME##N (void) \
DEBUG_NL; \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -121,7 +123,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -137,7 +141,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
@@ -163,7 +169,9 @@ DEBUG_INIT
#define T(N, NAME, TYPE) testit##NAME##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -179,7 +187,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -195,7 +205,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c
index f5b3c713f17..3b203fab201 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-2_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -102,7 +101,9 @@ testva##NAME##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -118,7 +119,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -134,7 +137,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c
index 571bea8d414..d5a31c9d5a4 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-3_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c
index e90b710b9fc..def20ce8b03 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_x.c
@@ -129,7 +129,9 @@ void checkScsi (Scsi x, int i)
void checkScis (Scis x, int i)
{ if (x.c != i/16 || x.i != i+1 || x.s != i+2) DEBUG_CHECK }
+#ifndef SKIP_ZERO_ARRAY
T(0, Sc)
+#endif
T(1, Sc)
T(2, Sc)
T(3, Sc)
@@ -145,7 +147,9 @@ T(12, Sc)
T(13, Sc)
T(14, Sc)
T(15, Sc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Ss)
+#endif
T(1, Ss)
T(2, Ss)
T(3, Ss)
@@ -161,7 +165,9 @@ T(12, Ss)
T(13, Ss)
T(14, Ss)
T(15, Ss)
+#ifndef SKIP_ZERO_ARRAY
T(0, Si)
+#endif
T(1, Si)
T(2, Si)
T(3, Si)
@@ -187,7 +193,9 @@ DEBUG_INIT
#define T(N, TYPE) testit##TYPE##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, Sc)
+#endif
T(1, Sc)
T(2, Sc)
T(3, Sc)
@@ -203,7 +211,9 @@ T(12, Sc)
T(13, Sc)
T(14, Sc)
T(15, Sc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Ss)
+#endif
T(1, Ss)
T(2, Ss)
T(3, Ss)
@@ -219,7 +229,9 @@ T(12, Ss)
T(13, Ss)
T(14, Ss)
T(15, Ss)
+#ifndef SKIP_ZERO_ARRAY
T(0, Si)
+#endif
T(1, Si)
T(2, Si)
T(3, Si)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c
index 2541dd06d52..fe1b09577dd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-4_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -107,7 +106,9 @@ testva##TYPE##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, Sc)
+#endif
T(1, Sc)
T(2, Sc)
T(3, Sc)
@@ -123,7 +124,9 @@ T(12, Sc)
T(13, Sc)
T(14, Sc)
T(15, Sc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Ss)
+#endif
T(1, Ss)
T(2, Ss)
T(3, Ss)
@@ -139,7 +142,9 @@ T(12, Ss)
T(13, Ss)
T(14, Ss)
T(15, Ss)
+#ifndef SKIP_ZERO_ARRAY
T(0, Si)
+#endif
T(1, Si)
T(2, Si)
T(3, Si)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c
deleted file mode 100644
index 32eaafbe23b..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test structures passed by value, including to a function with a
- variable-length argument lists. All struct members are float
- scalars. */
-
-extern void struct_by_value_5_x (void);
-extern void exit (int);
-int fails;
-
-int
-main ()
-{
- struct_by_value_5_x ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c
deleted file mode 100644
index e0cbb5782c2..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_x.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "compat-common.h"
-
-#include "fp-struct-defs.h"
-#include "fp-struct-check.h"
-#include "fp-struct-test-by-value-x.h"
-
-DEFS(f, float)
-CHECKS(f, float)
-
-TEST(Sf1, float)
-TEST(Sf2, float)
-TEST(Sf3, float)
-TEST(Sf4, float)
-TEST(Sf5, float)
-TEST(Sf6, float)
-TEST(Sf7, float)
-TEST(Sf8, float)
-TEST(Sf9, float)
-TEST(Sf10, float)
-TEST(Sf11, float)
-TEST(Sf12, float)
-TEST(Sf13, float)
-TEST(Sf14, float)
-TEST(Sf15, float)
-TEST(Sf16, float)
-
-#undef T
-
-void
-struct_by_value_5_x ()
-{
-DEBUG_INIT
-
-#define T(TYPE, MTYPE) testit##TYPE ();
-
-T(Sf1, float)
-T(Sf2, float)
-T(Sf3, float)
-T(Sf4, float)
-T(Sf5, float)
-T(Sf6, float)
-T(Sf7, float)
-T(Sf8, float)
-T(Sf9, float)
-T(Sf10, float)
-T(Sf11, float)
-T(Sf12, float)
-T(Sf13, float)
-T(Sf14, float)
-T(Sf15, float)
-T(Sf16, float)
-
-DEBUG_FINI
-
-if (fails != 0)
- abort ();
-
-#undef T
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c
deleted file mode 100644
index 9290b8fa92e..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-5_y.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdarg.h>
-
-#include "compat-common.h"
-
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
-const int test_va = 0;
-#else
-const int test_va = 1;
-#endif
-
-#include "fp-struct-defs.h"
-#include "fp-struct-init.h"
-#include "fp-struct-test-by-value-y.h"
-
-DEFS(f,float)
-INITS(f, float)
-
-TEST(Sf1, float)
-TEST(Sf2, float)
-TEST(Sf3, float)
-TEST(Sf4, float)
-TEST(Sf5, float)
-TEST(Sf6, float)
-TEST(Sf7, float)
-TEST(Sf8, float)
-TEST(Sf9, float)
-TEST(Sf10, float)
-TEST(Sf11, float)
-TEST(Sf12, float)
-TEST(Sf13, float)
-TEST(Sf14, float)
-TEST(Sf15, float)
-TEST(Sf16, float)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c
deleted file mode 100644
index 39dc31f4a6a..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test structures passed by value, including to a function with a
- variable-length argument lists. All struct members are double
- scalars. */
-
-extern void struct_by_value_6_x (void);
-extern void exit (int);
-int fails;
-
-int
-main ()
-{
- struct_by_value_6_x ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c
deleted file mode 100644
index 21989194cf7..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_x.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "compat-common.h"
-
-#include "fp-struct-defs.h"
-#include "fp-struct-check.h"
-#include "fp-struct-test-by-value-x.h"
-
-DEFS(d, double)
-CHECKS(d, double)
-
-TEST(Sd1, double)
-TEST(Sd2, double)
-TEST(Sd3, double)
-TEST(Sd4, double)
-TEST(Sd5, double)
-TEST(Sd6, double)
-TEST(Sd7, double)
-TEST(Sd8, double)
-TEST(Sd9, double)
-TEST(Sd10, double)
-TEST(Sd11, double)
-TEST(Sd12, double)
-TEST(Sd13, double)
-TEST(Sd14, double)
-TEST(Sd15, double)
-TEST(Sd16, double)
-
-#undef T
-
-void
-struct_by_value_6_x ()
-{
-DEBUG_INIT
-
-#define T(TYPE, MTYPE) testit##TYPE ();
-
-T(Sd1, double)
-T(Sd2, double)
-T(Sd3, double)
-T(Sd4, double)
-T(Sd5, double)
-T(Sd6, double)
-T(Sd7, double)
-T(Sd8, double)
-T(Sd9, double)
-T(Sd10, double)
-T(Sd11, double)
-T(Sd12, double)
-T(Sd13, double)
-T(Sd14, double)
-T(Sd15, double)
-T(Sd16, double)
-
-DEBUG_FINI
-
-if (fails != 0)
- abort ();
-
-#undef T
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c
deleted file mode 100644
index b5bc10025a0..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-6_y.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdarg.h>
-
-#include "compat-common.h"
-
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
-const int test_va = 0;
-#else
-const int test_va = 1;
-#endif
-
-#include "fp-struct-defs.h"
-#include "fp-struct-init.h"
-#include "fp-struct-test-by-value-y.h"
-
-DEFS(d, double)
-INITS(d, double)
-
-TEST(Sd1, double)
-TEST(Sd2, double)
-TEST(Sd3, double)
-TEST(Sd4, double)
-TEST(Sd5, double)
-TEST(Sd6, double)
-TEST(Sd7, double)
-TEST(Sd8, double)
-TEST(Sd9, double)
-TEST(Sd10, double)
-TEST(Sd11, double)
-TEST(Sd12, double)
-TEST(Sd13, double)
-TEST(Sd14, double)
-TEST(Sd15, double)
-TEST(Sd16, double)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c
deleted file mode 100644
index 98caf4286a4..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_main.c
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Test structures passed by value, including to a function with a
- variable-length argument lists. All struct members are long double
- scalars. */
-
-extern void struct_by_value_7_x (void);
-extern void exit (int);
-int fails;
-
-int
-main ()
-{
- struct_by_value_7_x ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c
deleted file mode 100644
index 018db252ae4..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_x.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include "compat-common.h"
-
-#include "fp-struct-defs.h"
-#include "fp-struct-check.h"
-#include "fp-struct-test-by-value-x.h"
-
-DEFS(ld, long double)
-CHECKS(ld, long double)
-
-TEST(Sld1, long double)
-TEST(Sld2, long double)
-TEST(Sld3, long double)
-TEST(Sld4, long double)
-TEST(Sld5, long double)
-TEST(Sld6, long double)
-TEST(Sld7, long double)
-TEST(Sld8, long double)
-TEST(Sld9, long double)
-TEST(Sld10, long double)
-TEST(Sld11, long double)
-TEST(Sld12, long double)
-TEST(Sld13, long double)
-TEST(Sld14, long double)
-TEST(Sld15, long double)
-TEST(Sld16, long double)
-
-#undef T
-
-void
-struct_by_value_7_x ()
-{
-DEBUG_INIT
-
-#define T(TYPE, MTYPE) testit##TYPE ();
-
-T(Sld1, long double)
-T(Sld2, long double)
-T(Sld3, long double)
-T(Sld4, long double)
-T(Sld5, long double)
-T(Sld6, long double)
-T(Sld7, long double)
-T(Sld8, long double)
-T(Sld9, long double)
-T(Sld10, long double)
-T(Sld11, long double)
-T(Sld12, long double)
-T(Sld13, long double)
-T(Sld14, long double)
-T(Sld15, long double)
-T(Sld16, long double)
-
-DEBUG_FINI
-
-if (fails != 0)
- abort ();
-
-#undef T
-}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c
deleted file mode 100644
index ca52a9b10f7..00000000000
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-7_y.c
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <stdarg.h>
-
-#include "compat-common.h"
-
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
-const int test_va = 0;
-#else
-const int test_va = 1;
-#endif
-
-#include "fp-struct-defs.h"
-#include "fp-struct-init.h"
-#include "fp-struct-test-by-value-y.h"
-
-DEFS(ld, long double)
-INITS(ld, long double)
-
-TEST(Sld1, long double)
-TEST(Sld2, long double)
-TEST(Sld3, long double)
-TEST(Sld4, long double)
-TEST(Sld5, long double)
-TEST(Sld6, long double)
-TEST(Sld7, long double)
-TEST(Sld8, long double)
-TEST(Sld9, long double)
-TEST(Sld10, long double)
-TEST(Sld11, long double)
-TEST(Sld12, long double)
-TEST(Sld13, long double)
-TEST(Sld14, long double)
-TEST(Sld15, long double)
-TEST(Sld16, long double)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c
index 6fe9ce75ae0..5a376fd38cf 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_x.c
@@ -129,7 +129,9 @@ void checkScsi (Scsi x, int i)
void checkScis (Scis x, int i)
{ if (x.c != i/16 || x.i != i+1 || x.s != i+2) DEBUG_CHECK }
+#ifndef SKIP_ZERO_ARRAY
T(0, Ssc)
+#endif
T(1, Ssc)
T(2, Ssc)
T(3, Ssc)
@@ -145,7 +147,9 @@ T(12, Ssc)
T(13, Ssc)
T(14, Ssc)
T(15, Ssc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Sis)
+#endif
T(1, Sis)
T(2, Sis)
T(3, Sis)
@@ -171,7 +175,9 @@ DEBUG_INIT
#define T(N, TYPE) testit##TYPE##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, Ssc)
+#endif
T(1, Ssc)
T(2, Ssc)
T(3, Ssc)
@@ -187,7 +193,9 @@ T(12, Ssc)
T(13, Ssc)
T(14, Ssc)
T(15, Ssc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Sis)
+#endif
T(1, Sis)
T(2, Sis)
T(3, Sis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c
index 9dadfb03c1f..b246fd44893 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-8_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -107,7 +106,9 @@ testva##TYPE##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, Ssc)
+#endif
T(1, Ssc)
T(2, Ssc)
T(3, Ssc)
@@ -123,7 +124,9 @@ T(12, Ssc)
T(13, Ssc)
T(14, Ssc)
T(15, Ssc)
+#ifndef SKIP_ZERO_ARRAY
T(0, Sis)
+#endif
T(1, Sis)
T(2, Sis)
T(3, Sis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c
index d6e43e75b0b..5bbef770aca 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_x.c
@@ -132,7 +132,9 @@ void checkScsi (Scsi x, int i)
void checkScis (Scis x, int i)
{ if (x.c != i/16 || x.i != i+1 || x.s != i+2) DEBUG_CHECK }
+#ifndef SKIP_ZERO_ARRAY
T(0, Scsi)
+#endif
T(1, Scsi)
T(2, Scsi)
T(3, Scsi)
@@ -148,7 +150,9 @@ T(12, Scsi)
T(13, Scsi)
T(14, Scsi)
T(15, Scsi)
+#ifndef SKIP_ZERO_ARRAY
T(0, Scis)
+#endif
T(1, Scis)
T(2, Scis)
T(3, Scis)
@@ -174,7 +178,9 @@ DEBUG_INIT
#define T(N, TYPE) testit##TYPE##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, Scsi)
+#endif
T(1, Scsi)
T(2, Scsi)
T(3, Scsi)
@@ -190,7 +196,9 @@ T(12, Scsi)
T(13, Scsi)
T(14, Scsi)
T(15, Scsi)
+#ifndef SKIP_ZERO_ARRAY
T(0, Scis)
+#endif
T(1, Scis)
T(2, Scis)
T(3, Scis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c
index 5d034048c1a..0f652180085 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-9_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -107,7 +106,9 @@ testva##TYPE##N (int n, ...) \
} \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, Scsi)
+#endif
T(1, Scsi)
T(2, Scsi)
T(3, Scsi)
@@ -123,7 +124,9 @@ T(12, Scsi)
T(13, Scsi)
T(14, Scsi)
T(15, Scsi)
+#ifndef SKIP_ZERO_ARRAY
T(0, Scis)
+#endif
T(1, Scis)
T(2, Scis)
T(3, Scis)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index dab24966db6..bf40426a63e 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -563,10 +563,7 @@ int main (void)\n\
#include \"t%03d_test.h\"\n\
#undef TX\n\
if (fails)\n\
- {\n\
- fflush (stdout);\n\
- abort ();\n\
- }\n\
+ abort ();\n\
exit (0);\n\
}\n", srcdir, srcdir, filecnt, filecnt);
fclose (outfile);
@@ -1201,20 +1198,6 @@ choose_type (enum FEATURE features, struct entry *e, int r)
abort ();
}
-/* This is from gcc.c-torture/execute/builtin-bitops-1.c. */
-static int
-my_ffsll (unsigned long long x)
-{
- int i;
- if (x == 0)
- return 0;
- /* We've tested LLONG_MAX for 64 bits so this should be safe. */
- for (i = 0; i < 64; i++)
- if (x & (1ULL << i))
- break;
- return i + 1;
-}
-
void
generate_fields (enum FEATURE features, struct entry *e, struct entry *parent,
int len)
@@ -1327,9 +1310,9 @@ generate_fields (enum FEATURE features, struct entry *e, struct entry *parent,
case 'B': ma = 1; break;
case ' ':
if (e[j].type->type == TYPE_UENUM)
- mi = my_ffsll (e[j].type->maxval + 1) - 1;
+ mi = ffsll (e[j].type->maxval + 1) - 1;
else if (e[j].type->type == TYPE_SENUM)
- mi = my_ffsll (e[j].type->maxval + 1);
+ mi = ffsll (e[j].type->maxval + 1);
else
abort ();
if (!mi)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c
index bb417d76146..d1531b179bd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-10_x.c
@@ -75,18 +75,18 @@ testit##TYPE (void) \
#include "fp2-struct-defs.h"
#include "fp2-struct-check.h"
-T(Sfd);
-T(Sfl);
-T(Sdf);
-T(Sdl);
-T(Slf);
-T(Sld);
-T(Sfdl);
-T(Sfld);
-T(Sdfl);
-T(Sdlf);
-T(Slfd);
-T(Sldf);
+T(Sfd)
+T(Sfl)
+T(Sdf)
+T(Sdl)
+T(Slf)
+T(Sld)
+T(Sfdl)
+T(Sfld)
+T(Sdfl)
+T(Sdlf)
+T(Slfd)
+T(Sldf)
#undef T
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c b/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c
index 2cd9c604c06..7af4068d5d0 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-10_y.c
@@ -2,8 +2,7 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c
index cb3e8a905c4..0085a9f6883 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-19_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c
index 685ef6f8b03..be7139f7d54 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-20_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c
index 4463dc4cbcd..590c30aa937 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-2_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
@@ -102,7 +101,9 @@ testit##NAME##N (void) \
DEBUG_NL; \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -118,7 +119,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -134,7 +137,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
@@ -160,7 +165,9 @@ DEBUG_INIT
#define T(N, NAME, TYPE) testit##NAME##N ();
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -176,7 +183,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -192,7 +201,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c b/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c
index d8bdcc240de..7d7df8ef6cd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-2_y.c
@@ -70,7 +70,9 @@ testva##NAME##N (int n, ...) \
return rslt; \
}
+#ifndef SKIP_ZERO_ARRAY
T(0, uc, unsigned char)
+#endif
T(1, uc, unsigned char)
T(2, uc, unsigned char)
T(3, uc, unsigned char)
@@ -86,7 +88,9 @@ T(12, uc, unsigned char)
T(13, uc, unsigned char)
T(14, uc, unsigned char)
T(15, uc, unsigned char)
+#ifndef SKIP_ZERO_ARRAY
T(0, us, unsigned short)
+#endif
T(1, us, unsigned short)
T(2, us, unsigned short)
T(3, us, unsigned short)
@@ -102,7 +106,9 @@ T(12, us, unsigned short)
T(13, us, unsigned short)
T(14, us, unsigned short)
T(15, us, unsigned short)
+#ifndef SKIP_ZERO_ARRAY
T(0, ui, unsigned int)
+#endif
T(1, ui, unsigned int)
T(2, ui, unsigned int)
T(3, ui, unsigned int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c b/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c
index e8b18850b1f..e985f91e444 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-return-3_x.c
@@ -1,7 +1,6 @@
#include "compat-common.h"
-/* Turn off checking for variable arguments with -DSKIPVA. */
-#ifdef SKIPVA
+#ifdef SKIP_VA
const int test_va = 0;
#else
const int test_va = 1;
diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_x.c b/gcc/testsuite/gcc.dg/compat/vector-1_x.c
index c7e69731400..11995b496e5 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-1_x.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-1_x.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-setup.h"
@@ -14,9 +16,12 @@ SETUP (4, si);
SETUP (1, di);
SETUP (2, di);
+#endif
+
void
vector_1_x (void)
{
+#ifndef SKIP_ATTRIBUTE
DEBUG_INIT
CHECK (8, qi);
@@ -33,4 +38,5 @@ vector_1_x (void)
if (fails != 0)
abort ();
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/vector-1_y.c b/gcc/testsuite/gcc.dg/compat/vector-1_y.c
index 1b8b6d7a49e..1cec61734b4 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-1_y.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-1_y.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-check.h"
@@ -13,3 +15,5 @@ TEST (2, si, 301)
TEST (4, si, 302)
TEST (1, di, 401)
TEST (2, di, 402)
+
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_x.c b/gcc/testsuite/gcc.dg/compat/vector-2_x.c
index 492878aa750..42881330557 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-2_x.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-2_x.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-setup.h"
@@ -9,9 +11,12 @@ SETUP (4, sf);
SETUP (16, sf);
SETUP (2, df);
+#endif
+
void
vector_2_x (void)
{
+#ifndef SKIP_ATTRIBUTE
DEBUG_INIT
CHECK (2, sf);
@@ -23,4 +28,5 @@ vector_2_x (void)
if (fails != 0)
abort ();
+#endif
}
diff --git a/gcc/testsuite/gcc.dg/compat/vector-2_y.c b/gcc/testsuite/gcc.dg/compat/vector-2_y.c
index e100560a507..b04f9f64985 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-2_y.c
+++ b/gcc/testsuite/gcc.dg/compat/vector-2_y.c
@@ -1,5 +1,7 @@
/* { dg-options "-w" } */
+#ifndef SKIP_ATTRIBUTE
+
#include "compat-common.h"
#include "vector-defs.h"
#include "vector-check.h"
@@ -8,3 +10,5 @@ TEST (2, sf, 301.0)
TEST (4, sf, 302.0)
TEST (16, sf, 304.0)
TEST (2, df, 402.0)
+
+#endif
diff --git a/gcc/testsuite/gcc.dg/compat/vector-check.h b/gcc/testsuite/gcc.dg/compat/vector-check.h
index f500bd4f43a..2d586d287d9 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-check.h
+++ b/gcc/testsuite/gcc.dg/compat/vector-check.h
@@ -1,6 +1,6 @@
#define TEST(NUM,TMODE,VAL) \
extern v##NUM##TMODE g_v##NUM##TMODE; \
-extern int g_##TMODE; \
+extern TMODE g_##TMODE; \
\
extern void pass_v##NUM##TMODE (v##NUM##TMODE); \
extern v##NUM##TMODE return_v##NUM##TMODE (void); \
diff --git a/gcc/testsuite/gcc.dg/compat/vector-defs.h b/gcc/testsuite/gcc.dg/compat/vector-defs.h
index cef5d76b2a2..57140f115cd 100644
--- a/gcc/testsuite/gcc.dg/compat/vector-defs.h
+++ b/gcc/testsuite/gcc.dg/compat/vector-defs.h
@@ -1,46 +1,72 @@
/* This includes all of the vector modes that are recognized by
- c_common_type_for_mode, grouped by base mode. */
+ c_common_type_for_mode. */
typedef int __attribute__((mode(QI))) qi;
+typedef int __attribute__((mode(HI))) hi;
+typedef int __attribute__((mode(SI))) si;
+typedef int __attribute__((mode(DI))) di;
+typedef float __attribute__((mode(SF))) sf;
+typedef float __attribute__((mode(DF))) df;
+
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 5)
+
+typedef qi __attribute__((vector_size (8))) v8qi;
+typedef qi __attribute__((vector_size (16))) v16qi;
+
+typedef hi __attribute__((vector_size (4))) v2hi;
+typedef hi __attribute__((vector_size (8))) v4hi;
+typedef hi __attribute__((vector_size (16))) v8hi;
+
+typedef si __attribute__((vector_size (8))) v2si;
+typedef si __attribute__((vector_size (16))) v4si;
+
+typedef di __attribute__((vector_size (8))) v1di;
+typedef di __attribute__((vector_size (16))) v2di;
+
+typedef sf __attribute__((vector_size (8))) v2sf;
+typedef sf __attribute__((vector_size (16))) v4sf;
+typedef sf __attribute__((vector_size (64))) v16sf;
+
+typedef df __attribute__((vector_size (16))) v2df;
+
+#else
+
typedef int __attribute__((mode(V8QI))) v8qi;
typedef int __attribute__((mode(V16QI))) v16qi;
-typedef union U8QI { v8qi v; qi a[8]; } u8qi;
-typedef union U16QI { v16qi v; qi a[16]; } u16qi;
-
-typedef int __attribute__((mode(HI))) hi;
typedef int __attribute__((mode(V2HI))) v2hi;
typedef int __attribute__((mode(V4HI))) v4hi;
typedef int __attribute__((mode(V8HI))) v8hi;
-typedef union U2HI { v2hi v; hi a[2]; } u2hi;
-typedef union U4HI { v4hi v; hi a[4]; } u4hi;
-typedef union U8HI { v8hi v; hi a[8]; } u8hi;
-
-typedef int __attribute__((mode(SI))) si;
typedef int __attribute__((mode(V2SI))) v2si;
typedef int __attribute__((mode(V4SI))) v4si;
-typedef union U2SI { v2si v; si a[2]; } u2si;
-typedef union U4SI { v4si v; si a[4]; } u4si;
-
-typedef int __attribute__((mode(DI))) di;
typedef int __attribute__((mode(V1DI))) v1di;
typedef int __attribute__((mode(V2DI))) v2di;
-typedef union U1DI { v1di v; di a[1]; } u1di;
-typedef union U2DI { v2di v; di a[2]; } u2di;
-
-typedef float __attribute__((mode(SF))) sf;
typedef float __attribute__((mode(V2SF))) v2sf;
typedef float __attribute__((mode(V4SF))) v4sf;
typedef float __attribute__((mode(V16SF))) v16sf;
+typedef float __attribute__((mode(V2DF))) v2df;
+
+#endif
+
+typedef union U8QI { v8qi v; qi a[8]; } u8qi;
+typedef union U16QI { v16qi v; qi a[16]; } u16qi;
+
+typedef union U2HI { v2hi v; hi a[2]; } u2hi;
+typedef union U4HI { v4hi v; hi a[4]; } u4hi;
+typedef union U8HI { v8hi v; hi a[8]; } u8hi;
+
+typedef union U2SI { v2si v; si a[2]; } u2si;
+typedef union U4SI { v4si v; si a[4]; } u4si;
+
+typedef union U1DI { v1di v; di a[1]; } u1di;
+typedef union U2DI { v2di v; di a[2]; } u2di;
+
typedef union U2SF { v2sf v; sf a[2]; } u2sf;
typedef union U4SF { v4sf v; sf a[4]; } u4sf;
typedef union U16SF { v16sf v; sf a[16]; } u16sf;
-typedef float __attribute__((mode(DF))) df;
-typedef float __attribute__((mode(V2DF))) v2df;
-
typedef union U2DF { v2df v; df a[2]; } u2df;