aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c
diff options
context:
space:
mode:
authorJanis Johnson <janis187@us.ibm.com>2003-05-20 22:15:45 +0000
committerJanis Johnson <janis@gcc.gnu.org>2003-05-20 22:15:45 +0000
commitf737a52d03639a15f3fa1acbe63945d97976c08c (patch)
treec37af5536d46dea2d20098e39130b94e9ef2a248 /gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c
parent5d34c8e946a9df8f7c48739046418b28201077df (diff)
downloadgcc-f737a52d03639a15f3fa1acbe63945d97976c08c.zip
gcc-f737a52d03639a15f3fa1acbe63945d97976c08c.tar.gz
gcc-f737a52d03639a15f3fa1acbe63945d97976c08c.tar.bz2
struct-by-value-3_x.c: Move common pieces to headers.
2003-05-20 Janis Johnson <janis187@us.ibm.com> * gcc.dg/compat/struct-by-value-3_x.c: Move common pieces to headers. * gcc.dg/compat/struct-by-value-3_y.c: Ditto. * gcc.dg/compat/struct-by-value-5_x.c: Ditto. * gcc.dg/compat/struct-by-value-5_y.c: Ditto. * gcc.dg/compat/struct-by-value-6_x.c: Ditto. * gcc.dg/compat/struct-by-value-6_y.c: Ditto. * gcc.dg/compat/struct-by-value-7_x.c Ditto. * gcc.dg/compat/struct-by-value-7_y.c Ditto. * gcc.dg/compat/small-struct-defs.h: New file. * gcc.dg/compat/small-struct-init.h: New file. * gcc.dg/compat/small-struct-check.h: New file. * gcc.dg/compat/fp-struct-defs.h: New file. * gcc.dg/compat/fp-struct-check.h: New file. * gcc.dg/compat/fp-struct-init.h: New file. * gcc.dg/compat/fp-struct-test-by-value-y.h: New file. * gcc.dg/compat/fp-struct-test-by-value-x.h: New file. * gcc.dg/compat/scalar-return-1_main.c: New file. * gcc.dg/compat/scalar-return-1_x.c: New file. * gcc.dg/compat/scalar-return-1_y.c: New file. * gcc.dg/compat/scalar-return-2_main.c: New file. * gcc.dg/compat/scalar-return-2_x.c: New file. * gcc.dg/compat/scalar-return-2_y.c: New file. * gcc.dg/compat/struct-return-3_main.c: New file. * gcc.dg/compat/struct-return-3_y.c: New file. * gcc.dg/compat/struct-return-3_x.c: New file. * gcc.dg/compat/struct-return-2_main.c: New file. * gcc.dg/compat/struct-return-2_x.c: New file. * gcc.dg/compat/struct-return-2_y.c: New file. From-SVN: r67038
Diffstat (limited to 'gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c')
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c45
1 files changed, 2 insertions, 43 deletions
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c
index 596a420..3eaa034 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-3_x.c
@@ -123,51 +123,10 @@ testit##TYPE (void) \
DEBUG_NL; \
}
-typedef struct { char c; } Sc;
-typedef struct { short s; } Ss;
-typedef struct { int i; } Si;
-typedef struct { short s; char c; } Ssc;
-typedef struct { char c; short s; } Scs;
-typedef struct { int i; char c; } Sic;
-typedef struct { char c; int i; } Sci;
-typedef struct { short s; int i; } Ssi;
-typedef struct { int i; short s; } Sis;
-typedef struct { char c; short s; int i; } Scsi;
-typedef struct { char c; int i; short s; } Scis;
-typedef struct { short s; char c; int i; } Ssci;
-typedef struct { short s; int i; char c; } Ssic;
-typedef struct { int i; short s; char c; } Sisc;
-typedef struct { int i; char c; short s; } Sics;
-
extern void abort (void);
-void checkSc (Sc x, int i) { if (x.c != (char)i) { DEBUG_NL; abort (); } }
-void checkSs (Ss x, int i) { if (x.s != i) { DEBUG_NL; abort (); } }
-void checkSi (Si x, int i) { if (x.i != i) { DEBUG_NL; abort (); } }
-void checkSsc (Ssc x, int i)
-{ if (x.s != i || x.c != (char)i+1) { DEBUG_NL; abort (); } }
-void checkScs (Scs x, int i)
-{ if (x.c != (char)i || x.s != i+1) { DEBUG_NL; abort (); } }
-void checkSsi (Ssi x, int i)
-{ if (x.s != i || x.i != i+1) { DEBUG_NL; abort (); } }
-void checkSis (Sis x, int i)
-{ if (x.i != i || x.s != i+1) { DEBUG_NL; abort (); } }
-void checkSic (Sic x, int i)
-{ if (x.i != i || x.c != (char)i+1) { DEBUG_NL; abort (); } }
-void checkSci (Sci x, int i)
-{ if (x.c != (char)i || x.i != i+1) { DEBUG_NL; abort (); } }
-void checkScsi (Scsi x, int i)
-{ if (x.c != (char)i || x.s != i+1 || x.i != i+2) { DEBUG_NL; abort (); } }
-void checkScis (Scis x, int i)
-{ if (x.c != (char)i || x.i != i+1 || x.s != i+2) { DEBUG_NL; abort (); } }
-void checkSsci (Ssci x, int i)
-{ if (x.s != i || x.c != (char)i+1 || x.i != i+2) { DEBUG_NL; abort (); } }
-void checkSsic (Ssic x, int i)
-{ if (x.s != i || x.i != i+1 || x.c != (char)i+2) { DEBUG_NL; abort (); } }
-void checkSisc (Sisc x, int i)
-{ if (x.i != i || x.s != i+1 || x.c != (char)i+2) { DEBUG_NL; abort (); } }
-void checkSics (Sics x, int i)
-{ if (x.i != i || x.c != (char)i+1 || x.s != i+2) { DEBUG_NL; abort (); } }
+#include "small-struct-defs.h"
+#include "small-struct-check.h"
T(Sc)
T(Ss)