+2008-07-02 Andy Hutchinson <hutchinsonandy@aim.com>
+
+ PR testsuite/36285
+ * gcc.dg/compat/struct-by-value-16_x.c: Move some tests to new file
+ to reduce code size.
+ * gcc.dg/compat/struct-by-value-16_y.c: Ditto.
+ * gcc.dg/compat/struct-by-value-16a_main.c: New file.
+ * gcc.dg/compat/struct-by-value-16a_x.c: Ditto.
+ * gcc.dg/compat/struct-by-value-16a_y.c: Ditto.
+ * gcc.dg/compat/struct-by-value-17_x.c: Move some tests to new file
+ to reduce code size.
+ * gcc.dg/compat/struct-by-value-17_y.c: Ditto.
+ * gcc.dg/compat/struct-by-value-17a_main.c: New file.
+ * gcc.dg/compat/struct-by-value-17a_x.c: Ditto.
+ * gcc.dg/compat/struct-by-value-17a_y.c: Ditto.
+ * gcc.dg/compat/struct-by-value-18_x.c: Move some tests to new file
+ to reduce code size.
+ * gcc.dg/compat/struct-by-value-18_y.c: Ditto.
+ * gcc.dg/compat/struct-by-value-18a_main.c: New file.
+ * gcc.dg/compat/struct-by-value-18a_x.c: Ditto.
+ * gcc.dg/compat/struct-by-value-18a_y.c: Ditto.
+
+
2008-07-02 Andy Hutchinson <hutchinsonandy@aim.com>
* gcc.dg/pr36227.c: Correct test for targets where long is
TEST(Scf10, _Complex float)
TEST(Scf11, _Complex float)
TEST(Scf12, _Complex float)
-TEST(Scf13, _Complex float)
-TEST(Scf14, _Complex float)
-TEST(Scf15, _Complex float)
-TEST(Scf16, _Complex float)
+
#undef T
T(Scf10, _Complex float)
T(Scf11, _Complex float)
T(Scf12, _Complex float)
-T(Scf13, _Complex float)
-T(Scf14, _Complex float)
-T(Scf15, _Complex float)
-T(Scf16, _Complex float)
+
DEBUG_FINI
TEST(Scf10, _Complex float)
TEST(Scf11, _Complex float)
TEST(Scf12, _Complex float)
-TEST(Scf13, _Complex float)
-TEST(Scf14, _Complex float)
-TEST(Scf15, _Complex float)
-TEST(Scf16, _Complex float)
+
--- /dev/null
+/* Test structures passed by value, including to a function with a\r
+ variable-length argument lists. All struct members are of type\r
+ _Complex float. */\r
+\r
+extern void struct_by_value_16_x (void);\r
+extern void exit (int);\r
+int fails;\r
+\r
+int\r
+main ()\r
+{\r
+ struct_by_value_16a_x ();\r
+ exit (0);\r
+}\r
--- /dev/null
+#include "compat-common.h"\r
+\r
+#include "fp-struct-defs.h"\r
+#include "fp-struct-check.h"\r
+#include "fp-struct-test-by-value-x.h"\r
+\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
+\r
+#undef T\r
+\r
+void\r
+struct_by_value_16a_x ()\r
+{\r
+DEBUG_INIT\r
+\r
+#define T(TYPE, MTYPE) testit##TYPE ();\r
+\r
+\r
+T(Scf13, _Complex float)\r
+T(Scf14, _Complex float)\r
+T(Scf15, _Complex float)\r
+T(Scf16, _Complex float)\r
+\r
+DEBUG_FINI\r
+\r
+if (fails != 0)\r
+ abort ();\r
+\r
+#undef T\r
+}\r
--- /dev/null
+#include <stdarg.h>\r
+\r
+#include "compat-common.h"\r
+\r
+#ifdef SKIP_VA\r
+const int test_va = 0;\r
+#else\r
+const int test_va = 1;\r
+#endif\r
+\r
+#include "fp-struct-defs.h"\r
+#include "fp-struct-init.h"\r
+#include "fp-struct-test-by-value-y.h"\r
+\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
TEST(Scd10, _Complex double)
TEST(Scd11, _Complex double)
TEST(Scd12, _Complex double)
-TEST(Scd13, _Complex double)
-TEST(Scd14, _Complex double)
-TEST(Scd15, _Complex double)
-TEST(Scd16, _Complex double)
+
#undef T
T(Scd10, _Complex double)
T(Scd11, _Complex double)
T(Scd12, _Complex double)
-T(Scd13, _Complex double)
-T(Scd14, _Complex double)
-T(Scd15, _Complex double)
-T(Scd16, _Complex double)
+
DEBUG_FINI
TEST(Scd10, _Complex double)
TEST(Scd11, _Complex double)
TEST(Scd12, _Complex double)
-TEST(Scd13, _Complex double)
-TEST(Scd14, _Complex double)
-TEST(Scd15, _Complex double)
-TEST(Scd16, _Complex double)
+
--- /dev/null
+/* Test structures passed by value, including to a function with a
+ variable-length argument lists. All struct members are of type
+ _Complex double. */
+
+extern void struct_by_value_17_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+ struct_by_value_17a_x ();
+ exit (0);
+}
+/* Test structures passed by value, including to a function with a
+ variable-length argument lists. All struct members are of type
+ _Complex double. */
+
+extern void struct_by_value_17_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+ struct_by_value_17a_x ();
+ exit (0);
+}
--- /dev/null
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cd, _Complex double)
+CHECKS(cd, _Complex double)
+
+
+TEST(Scd13, _Complex double)
+TEST(Scd14, _Complex double)
+TEST(Scd15, _Complex double)
+TEST(Scd16, _Complex double)
+
+#undef T
+
+void
+struct_by_value_17a_x ()
+{
+DEBUG_INIT
+
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+
+T(Scd13, _Complex double)
+T(Scd14, _Complex double)
+T(Scd15, _Complex double)
+T(Scd16, _Complex double)
+
+DEBUG_FINI
+
+if (fails != 0)
+ abort ();
+
+#undef T
+}
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cd, _Complex double)
+CHECKS(cd, _Complex double)
+
+
+TEST(Scd13, _Complex double)
+TEST(Scd14, _Complex double)
+TEST(Scd15, _Complex double)
+TEST(Scd16, _Complex double)
+
+#undef T
+
+void
+struct_by_value_17a_x ()
+{
+DEBUG_INIT
+
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+
+T(Scd13, _Complex double)
+T(Scd14, _Complex double)
+T(Scd15, _Complex double)
+T(Scd16, _Complex double)
+
+DEBUG_FINI
+
+if (fails != 0)
+ abort ();
+
+#undef T
+}
--- /dev/null
+#include <stdarg.h>
+
+#include "compat-common.h"
+
+#ifdef SKIP_VA
+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(cd,_Complex double)
+INITS(cd, _Complex double)
+
+
+TEST(Scd13, _Complex double)
+TEST(Scd14, _Complex double)
+TEST(Scd15, _Complex double)
+TEST(Scd16, _Complex double)
+#include <stdarg.h>
+
+#include "compat-common.h"
+
+#ifdef SKIP_VA
+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(cd,_Complex double)
+INITS(cd, _Complex double)
+
+
+TEST(Scd13, _Complex double)
+TEST(Scd14, _Complex double)
+TEST(Scd15, _Complex double)
+TEST(Scd16, _Complex double)
TEST(Scld10, _Complex long double)
TEST(Scld11, _Complex long double)
TEST(Scld12, _Complex long double)
-TEST(Scld13, _Complex long double)
-TEST(Scld14, _Complex long double)
-TEST(Scld15, _Complex long double)
-TEST(Scld16, _Complex long double)
+
#undef T
T(Scld10, _Complex long double)
T(Scld11, _Complex long double)
T(Scld12, _Complex long double)
-T(Scld13, _Complex long double)
-T(Scld14, _Complex long double)
-T(Scld15, _Complex long double)
-T(Scld16, _Complex long double)
+
DEBUG_FINI
TEST(Scld10, _Complex long double)
TEST(Scld11, _Complex long double)
TEST(Scld12, _Complex long double)
-TEST(Scld13, _Complex long double)
-TEST(Scld14, _Complex long double)
-TEST(Scld15, _Complex long double)
-TEST(Scld16, _Complex long double)
+
--- /dev/null
+/* Test structures passed by value, including to a function with a\r
+ variable-length argument lists. All struct members are of type\r
+ _Complex long double. */\r
+\r
+extern void struct_by_value_18_x (void);\r
+extern void exit (int);\r
+int fails;\r
+\r
+int\r
+main ()\r
+{\r
+ struct_by_value_18a_x ();\r
+ exit (0);\r
+}\r
--- /dev/null
+#include "compat-common.h"\r
+\r
+#include "fp-struct-defs.h"\r
+#include "fp-struct-check.h"\r
+#include "fp-struct-test-by-value-x.h"\r
+\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
+\r
+#undef T\r
+\r
+void\r
+struct_by_value_18a_x ()\r
+{\r
+DEBUG_INIT\r
+\r
+#define T(TYPE, MTYPE) testit##TYPE ();\r
+\r
+\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
+\r
+DEBUG_FINI\r
+\r
+if (fails != 0)\r
+ abort ();\r
+\r
+#undef T\r
+}\r
--- /dev/null
+#include <stdarg.h>\r
+\r
+#include "compat-common.h"\r
+\r
+#ifdef SKIP_VA\r
+const int test_va = 0;\r
+#else\r
+const int test_va = 1;\r
+#endif\r
+\r
+#include "fp-struct-defs.h"\r
+#include "fp-struct-init.h"\r
+#include "fp-struct-test-by-value-y.h"\r
+\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