From 922eacadfc3c0a9986d5561056adfd289367a68c Mon Sep 17 00:00:00 2001
From: janis <janis@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 11 Jun 2003 20:29:21 +0000
Subject: [PATCH] 	* gcc.dg/compat/struct-by-value-11_main.c: New file. 
 * gcc.dg/compat/struct-by-value-11_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-11_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-12_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-12_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-12_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-13_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-13_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-13_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-14_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-14_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-14_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-15_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-15_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-15_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-16_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-16_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-16_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-17_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-17_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-17_y.c: New file. 	*
 gcc.dg/compat/struct-by-value-18_main.c: New file. 	*
 gcc.dg/compat/struct-by-value-18_x.c: New file. 	*
 gcc.dg/compat/struct-by-value-18_y.c: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67796 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/testsuite/ChangeLog                       | 25 +++++++++
 .../gcc.dg/compat/struct-by-value-11_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-11_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-11_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-12_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-12_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-12_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-13_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-13_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-13_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-14_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-14_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-14_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-15_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-15_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-15_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-16_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-16_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-16_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-17_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-17_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-17_y.c      | 34 ++++++++++++
 .../gcc.dg/compat/struct-by-value-18_main.c   | 14 +++++
 .../gcc.dg/compat/struct-by-value-18_x.c      | 55 +++++++++++++++++++
 .../gcc.dg/compat/struct-by-value-18_y.c      | 34 ++++++++++++
 25 files changed, 849 insertions(+)
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-11_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-12_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-13_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-14_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-15_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-16_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-16_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-17_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-17_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-18_main.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-18_x.c
 create mode 100644 gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index f11e2fb72b0b..f5ca84ba9144 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,30 @@
 2003-06-11  Janis Johnson  <janis187@us.ibm.com>
 
+	* gcc.dg/compat/struct-by-value-11_main.c: New file.
+	* gcc.dg/compat/struct-by-value-11_x.c: New file.
+	* gcc.dg/compat/struct-by-value-11_y.c: New file.
+	* gcc.dg/compat/struct-by-value-12_main.c: New file.
+	* gcc.dg/compat/struct-by-value-12_x.c: New file.
+	* gcc.dg/compat/struct-by-value-12_y.c: New file.
+	* gcc.dg/compat/struct-by-value-13_main.c: New file.
+	* gcc.dg/compat/struct-by-value-13_x.c: New file.
+	* gcc.dg/compat/struct-by-value-13_y.c: New file.
+	* gcc.dg/compat/struct-by-value-14_main.c: New file.
+	* gcc.dg/compat/struct-by-value-14_x.c: New file.
+	* gcc.dg/compat/struct-by-value-14_y.c: New file.
+	* gcc.dg/compat/struct-by-value-15_main.c: New file.
+	* gcc.dg/compat/struct-by-value-15_x.c: New file.
+	* gcc.dg/compat/struct-by-value-15_y.c: New file.
+	* gcc.dg/compat/struct-by-value-16_main.c: New file.
+	* gcc.dg/compat/struct-by-value-16_x.c: New file.
+	* gcc.dg/compat/struct-by-value-16_y.c: New file.
+	* gcc.dg/compat/struct-by-value-17_main.c: New file.
+	* gcc.dg/compat/struct-by-value-17_x.c: New file.
+	* gcc.dg/compat/struct-by-value-17_y.c: New file.
+	* gcc.dg/compat/struct-by-value-18_main.c: New file.
+	* gcc.dg/compat/struct-by-value-18_x.c: New file.
+	* gcc.dg/compat/struct-by-value-18_y.c: New file.
+
 	* gcc.dg/compat/scalar-by-value-3_main.c: New file.
 	* gcc.dg/compat/scalar-by-value-3_x.c: New file.
 	* gcc.dg/compat/scalar-by-value-3_y.c: New file.
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-11_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_main.c
new file mode 100644
index 000000000000..400e94c2cad4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are of type
+   _Complex char.  */
+
+extern void struct_by_value_11_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_11_x ();
+  exit (0);
+}
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
new file mode 100644
index 000000000000..237f67164034
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cc, _Complex char)
+CHECKS(cc, _Complex char)
+
+TEST(Scc1, _Complex char)
+TEST(Scc2, _Complex char)
+TEST(Scc3, _Complex char)
+TEST(Scc4, _Complex char)
+TEST(Scc5, _Complex char)
+TEST(Scc6, _Complex char)
+TEST(Scc7, _Complex char)
+TEST(Scc8, _Complex char)
+TEST(Scc9, _Complex char)
+TEST(Scc10, _Complex char)
+TEST(Scc11, _Complex char)
+TEST(Scc12, _Complex char)
+TEST(Scc13, _Complex char)
+TEST(Scc14, _Complex char)
+TEST(Scc15, _Complex char)
+TEST(Scc16, _Complex char)
+
+#undef T
+
+void
+struct_by_value_11_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scc1, _Complex char)
+T(Scc2, _Complex char)
+T(Scc3, _Complex char)
+T(Scc4, _Complex char)
+T(Scc5, _Complex char)
+T(Scc6, _Complex char)
+T(Scc7, _Complex char)
+T(Scc8, _Complex char)
+T(Scc9, _Complex char)
+T(Scc10, _Complex char)
+T(Scc11, _Complex char)
+T(Scc12, _Complex char)
+T(Scc13, _Complex char)
+T(Scc14, _Complex char)
+T(Scc15, _Complex char)
+T(Scc16, _Complex char)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..c0f0ad528af8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-11_y.c
@@ -0,0 +1,34 @@
+#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(cc,_Complex char)
+INITS(cc, _Complex char)
+
+TEST(Scc1, _Complex char)
+TEST(Scc2, _Complex char)
+TEST(Scc3, _Complex char)
+TEST(Scc4, _Complex char)
+TEST(Scc5, _Complex char)
+TEST(Scc6, _Complex char)
+TEST(Scc7, _Complex char)
+TEST(Scc8, _Complex char)
+TEST(Scc9, _Complex char)
+TEST(Scc10, _Complex char)
+TEST(Scc11, _Complex char)
+TEST(Scc12, _Complex char)
+TEST(Scc13, _Complex char)
+TEST(Scc14, _Complex char)
+TEST(Scc15, _Complex char)
+TEST(Scc16, _Complex char)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-12_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_main.c
new file mode 100644
index 000000000000..ab4faac09f33
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are of type
+   _Complex short.  */
+
+extern void struct_by_value_12_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_12_x ();
+  exit (0);
+}
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
new file mode 100644
index 000000000000..2ba6fc6c0b6e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cs, _Complex short)
+CHECKS(cs, _Complex short)
+
+TEST(Scs1, _Complex short)
+TEST(Scs2, _Complex short)
+TEST(Scs3, _Complex short)
+TEST(Scs4, _Complex short)
+TEST(Scs5, _Complex short)
+TEST(Scs6, _Complex short)
+TEST(Scs7, _Complex short)
+TEST(Scs8, _Complex short)
+TEST(Scs9, _Complex short)
+TEST(Scs10, _Complex short)
+TEST(Scs11, _Complex short)
+TEST(Scs12, _Complex short)
+TEST(Scs13, _Complex short)
+TEST(Scs14, _Complex short)
+TEST(Scs15, _Complex short)
+TEST(Scs16, _Complex short)
+
+#undef T
+
+void
+struct_by_value_12_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scs1, _Complex short)
+T(Scs2, _Complex short)
+T(Scs3, _Complex short)
+T(Scs4, _Complex short)
+T(Scs5, _Complex short)
+T(Scs6, _Complex short)
+T(Scs7, _Complex short)
+T(Scs8, _Complex short)
+T(Scs9, _Complex short)
+T(Scs10, _Complex short)
+T(Scs11, _Complex short)
+T(Scs12, _Complex short)
+T(Scs13, _Complex short)
+T(Scs14, _Complex short)
+T(Scs15, _Complex short)
+T(Scs16, _Complex short)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..50a08b467af0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-12_y.c
@@ -0,0 +1,34 @@
+#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(cs,_Complex short)
+INITS(cs, _Complex short)
+
+TEST(Scs1, _Complex short)
+TEST(Scs2, _Complex short)
+TEST(Scs3, _Complex short)
+TEST(Scs4, _Complex short)
+TEST(Scs5, _Complex short)
+TEST(Scs6, _Complex short)
+TEST(Scs7, _Complex short)
+TEST(Scs8, _Complex short)
+TEST(Scs9, _Complex short)
+TEST(Scs10, _Complex short)
+TEST(Scs11, _Complex short)
+TEST(Scs12, _Complex short)
+TEST(Scs13, _Complex short)
+TEST(Scs14, _Complex short)
+TEST(Scs15, _Complex short)
+TEST(Scs16, _Complex short)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-13_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_main.c
new file mode 100644
index 000000000000..b853bb88eee1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are type
+   _Complex int.  */
+
+extern void struct_by_value_l3_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_13_x ();
+  exit (0);
+}
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
new file mode 100644
index 000000000000..bf7af3a3603c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(ci, _Complex int)
+CHECKS(ci, _Complex int)
+
+TEST(Sci1, _Complex int)
+TEST(Sci2, _Complex int)
+TEST(Sci3, _Complex int)
+TEST(Sci4, _Complex int)
+TEST(Sci5, _Complex int)
+TEST(Sci6, _Complex int)
+TEST(Sci7, _Complex int)
+TEST(Sci8, _Complex int)
+TEST(Sci9, _Complex int)
+TEST(Sci10, _Complex int)
+TEST(Sci11, _Complex int)
+TEST(Sci12, _Complex int)
+TEST(Sci13, _Complex int)
+TEST(Sci14, _Complex int)
+TEST(Sci15, _Complex int)
+TEST(Sci16, _Complex int)
+
+#undef T
+
+void
+struct_by_value_13_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Sci1, _Complex int)
+T(Sci2, _Complex int)
+T(Sci3, _Complex int)
+T(Sci4, _Complex int)
+T(Sci5, _Complex int)
+T(Sci6, _Complex int)
+T(Sci7, _Complex int)
+T(Sci8, _Complex int)
+T(Sci9, _Complex int)
+T(Sci10, _Complex int)
+T(Sci11, _Complex int)
+T(Sci12, _Complex int)
+T(Sci13, _Complex int)
+T(Sci14, _Complex int)
+T(Sci15, _Complex int)
+T(Sci16, _Complex int)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..e53ee59fc430
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-13_y.c
@@ -0,0 +1,34 @@
+#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(ci,_Complex int)
+INITS(ci, _Complex int)
+
+TEST(Sci1, _Complex int)
+TEST(Sci2, _Complex int)
+TEST(Sci3, _Complex int)
+TEST(Sci4, _Complex int)
+TEST(Sci5, _Complex int)
+TEST(Sci6, _Complex int)
+TEST(Sci7, _Complex int)
+TEST(Sci8, _Complex int)
+TEST(Sci9, _Complex int)
+TEST(Sci10, _Complex int)
+TEST(Sci11, _Complex int)
+TEST(Sci12, _Complex int)
+TEST(Sci13, _Complex int)
+TEST(Sci14, _Complex int)
+TEST(Sci15, _Complex int)
+TEST(Sci16, _Complex int)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-14_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_main.c
new file mode 100644
index 000000000000..a332e93b1221
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are of type
+   _Complex long.  */
+
+extern void struct_by_value_14_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_14_x ();
+  exit (0);
+}
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
new file mode 100644
index 000000000000..765144c5376a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cl, _Complex long)
+CHECKS(cl, _Complex long)
+
+TEST(Scl1, _Complex long)
+TEST(Scl2, _Complex long)
+TEST(Scl3, _Complex long)
+TEST(Scl4, _Complex long)
+TEST(Scl5, _Complex long)
+TEST(Scl6, _Complex long)
+TEST(Scl7, _Complex long)
+TEST(Scl8, _Complex long)
+TEST(Scl9, _Complex long)
+TEST(Scl10, _Complex long)
+TEST(Scl11, _Complex long)
+TEST(Scl12, _Complex long)
+TEST(Scl13, _Complex long)
+TEST(Scl14, _Complex long)
+TEST(Scl15, _Complex long)
+TEST(Scl16, _Complex long)
+
+#undef T
+
+void
+struct_by_value_14_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scl1, _Complex long)
+T(Scl2, _Complex long)
+T(Scl3, _Complex long)
+T(Scl4, _Complex long)
+T(Scl5, _Complex long)
+T(Scl6, _Complex long)
+T(Scl7, _Complex long)
+T(Scl8, _Complex long)
+T(Scl9, _Complex long)
+T(Scl10, _Complex long)
+T(Scl11, _Complex long)
+T(Scl12, _Complex long)
+T(Scl13, _Complex long)
+T(Scl14, _Complex long)
+T(Scl15, _Complex long)
+T(Scl16, _Complex long)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..640b11bb06d6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-14_y.c
@@ -0,0 +1,34 @@
+#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(cl,_Complex long)
+INITS(cl, _Complex long)
+
+TEST(Scl1, _Complex long)
+TEST(Scl2, _Complex long)
+TEST(Scl3, _Complex long)
+TEST(Scl4, _Complex long)
+TEST(Scl5, _Complex long)
+TEST(Scl6, _Complex long)
+TEST(Scl7, _Complex long)
+TEST(Scl8, _Complex long)
+TEST(Scl9, _Complex long)
+TEST(Scl10, _Complex long)
+TEST(Scl11, _Complex long)
+TEST(Scl12, _Complex long)
+TEST(Scl13, _Complex long)
+TEST(Scl14, _Complex long)
+TEST(Scl15, _Complex long)
+TEST(Scl16, _Complex long)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-15_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_main.c
new file mode 100644
index 000000000000..6e5d8e0f48ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are of type
+   _Complex long long.  */
+
+extern void struct_by_value_15_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_15_x ();
+  exit (0);
+}
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
new file mode 100644
index 000000000000..732582e76b59
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cll, _Complex long long)
+CHECKS(cll, _Complex long long)
+
+TEST(Scll1, _Complex long long)
+TEST(Scll2, _Complex long long)
+TEST(Scll3, _Complex long long)
+TEST(Scll4, _Complex long long)
+TEST(Scll5, _Complex long long)
+TEST(Scll6, _Complex long long)
+TEST(Scll7, _Complex long long)
+TEST(Scll8, _Complex long long)
+TEST(Scll9, _Complex long long)
+TEST(Scll10, _Complex long long)
+TEST(Scll11, _Complex long long)
+TEST(Scll12, _Complex long long)
+TEST(Scll13, _Complex long long)
+TEST(Scll14, _Complex long long)
+TEST(Scll15, _Complex long long)
+TEST(Scll16, _Complex long long)
+
+#undef T
+
+void
+struct_by_value_15_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scll1, _Complex long long)
+T(Scll2, _Complex long long)
+T(Scll3, _Complex long long)
+T(Scll4, _Complex long long)
+T(Scll5, _Complex long long)
+T(Scll6, _Complex long long)
+T(Scll7, _Complex long long)
+T(Scll8, _Complex long long)
+T(Scll9, _Complex long long)
+T(Scll10, _Complex long long)
+T(Scll11, _Complex long long)
+T(Scll12, _Complex long long)
+T(Scll13, _Complex long long)
+T(Scll14, _Complex long long)
+T(Scll15, _Complex long long)
+T(Scll16, _Complex long long)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..e7cf60a2d455
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-15_y.c
@@ -0,0 +1,34 @@
+#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(cll,_Complex long long)
+INITS(cll, _Complex long long)
+
+TEST(Scll1, _Complex long long)
+TEST(Scll2, _Complex long long)
+TEST(Scll3, _Complex long long)
+TEST(Scll4, _Complex long long)
+TEST(Scll5, _Complex long long)
+TEST(Scll6, _Complex long long)
+TEST(Scll7, _Complex long long)
+TEST(Scll8, _Complex long long)
+TEST(Scll9, _Complex long long)
+TEST(Scll10, _Complex long long)
+TEST(Scll11, _Complex long long)
+TEST(Scll12, _Complex long long)
+TEST(Scll13, _Complex long long)
+TEST(Scll14, _Complex long long)
+TEST(Scll15, _Complex long long)
+TEST(Scll16, _Complex long long)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-16_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_main.c
new file mode 100644
index 000000000000..31447bee69e3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are of type
+   _Complex float.  */
+
+extern void struct_by_value_16_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_16_x ();
+  exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-16_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_x.c
new file mode 100644
index 000000000000..ef701767eb87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cf, _Complex float)
+CHECKS(cf, _Complex float)
+
+TEST(Scf1, _Complex float)
+TEST(Scf2, _Complex float)
+TEST(Scf3, _Complex float)
+TEST(Scf4, _Complex float)
+TEST(Scf5, _Complex float)
+TEST(Scf6, _Complex float)
+TEST(Scf7, _Complex float)
+TEST(Scf8, _Complex float)
+TEST(Scf9, _Complex float)
+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
+
+void
+struct_by_value_16_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scf1, _Complex float)
+T(Scf2, _Complex float)
+T(Scf3, _Complex float)
+T(Scf4, _Complex float)
+T(Scf5, _Complex float)
+T(Scf6, _Complex float)
+T(Scf7, _Complex float)
+T(Scf8, _Complex float)
+T(Scf9, _Complex float)
+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)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..9aa8c3f33a08
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-16_y.c
@@ -0,0 +1,34 @@
+#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(cf,_Complex float)
+INITS(cf, _Complex float)
+
+TEST(Scf1, _Complex float)
+TEST(Scf2, _Complex float)
+TEST(Scf3, _Complex float)
+TEST(Scf4, _Complex float)
+TEST(Scf5, _Complex float)
+TEST(Scf6, _Complex float)
+TEST(Scf7, _Complex float)
+TEST(Scf8, _Complex float)
+TEST(Scf9, _Complex float)
+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)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-17_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_main.c
new file mode 100644
index 000000000000..3d97146b309b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_main.c
@@ -0,0 +1,14 @@
+/* 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_17_x ();
+  exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-17_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_x.c
new file mode 100644
index 000000000000..624cc34df60c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_x.c
@@ -0,0 +1,55 @@
+#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(Scd1, _Complex double)
+TEST(Scd2, _Complex double)
+TEST(Scd3, _Complex double)
+TEST(Scd4, _Complex double)
+TEST(Scd5, _Complex double)
+TEST(Scd6, _Complex double)
+TEST(Scd7, _Complex double)
+TEST(Scd8, _Complex double)
+TEST(Scd9, _Complex double)
+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
+
+void
+struct_by_value_17_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scd1, _Complex double)
+T(Scd2, _Complex double)
+T(Scd3, _Complex double)
+T(Scd4, _Complex double)
+T(Scd5, _Complex double)
+T(Scd6, _Complex double)
+T(Scd7, _Complex double)
+T(Scd8, _Complex double)
+T(Scd9, _Complex double)
+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)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..f8e1a6aca064
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-17_y.c
@@ -0,0 +1,34 @@
+#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(cd,_Complex double)
+INITS(cd, _Complex double)
+
+TEST(Scd1, _Complex double)
+TEST(Scd2, _Complex double)
+TEST(Scd3, _Complex double)
+TEST(Scd4, _Complex double)
+TEST(Scd5, _Complex double)
+TEST(Scd6, _Complex double)
+TEST(Scd7, _Complex double)
+TEST(Scd8, _Complex double)
+TEST(Scd9, _Complex double)
+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)
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-18_main.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_main.c
new file mode 100644
index 000000000000..8a4889cc0978
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_main.c
@@ -0,0 +1,14 @@
+/* Test structures passed by value, including to a function with a
+   variable-length argument lists.  All struct members are of type
+   _Complex long double.  */
+
+extern void struct_by_value_18_x (void);
+extern void exit (int);
+int fails;
+
+int
+main ()
+{
+  struct_by_value_18_x ();
+  exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/compat/struct-by-value-18_x.c b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_x.c
new file mode 100644
index 000000000000..ec02c568de91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_x.c
@@ -0,0 +1,55 @@
+#include "compat-common.h"
+
+#include "fp-struct-defs.h"
+#include "fp-struct-check.h"
+#include "fp-struct-test-by-value-x.h"
+
+DEFS(cld, _Complex long double)
+CHECKS(cld, _Complex long double)
+
+TEST(Scld1, _Complex long double)
+TEST(Scld2, _Complex long double)
+TEST(Scld3, _Complex long double)
+TEST(Scld4, _Complex long double)
+TEST(Scld5, _Complex long double)
+TEST(Scld6, _Complex long double)
+TEST(Scld7, _Complex long double)
+TEST(Scld8, _Complex long double)
+TEST(Scld9, _Complex long 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
+
+void
+struct_by_value_18_x ()
+{
+#define T(TYPE, MTYPE) testit##TYPE ();
+
+T(Scld1, _Complex long double)
+T(Scld2, _Complex long double)
+T(Scld3, _Complex long double)
+T(Scld4, _Complex long double)
+T(Scld5, _Complex long double)
+T(Scld6, _Complex long double)
+T(Scld7, _Complex long double)
+T(Scld8, _Complex long double)
+T(Scld9, _Complex long double)
+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)
+
+if (fails != 0)
+  abort ();
+
+#undef T
+}
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
new file mode 100644
index 000000000000..662419326b91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/struct-by-value-18_y.c
@@ -0,0 +1,34 @@
+#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(cld,_Complex long double)
+INITS(cld, _Complex long double)
+
+TEST(Scld1, _Complex long double)
+TEST(Scld2, _Complex long double)
+TEST(Scld3, _Complex long double)
+TEST(Scld4, _Complex long double)
+TEST(Scld5, _Complex long double)
+TEST(Scld6, _Complex long double)
+TEST(Scld7, _Complex long double)
+TEST(Scld8, _Complex long double)
+TEST(Scld9, _Complex long 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)
-- 
GitLab