aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/g++.dg/compat/pr102024_main.C26
-rw-r--r--gcc/testsuite/g++.dg/compat/pr102024_test.h6
-rw-r--r--gcc/testsuite/g++.dg/compat/pr102024_x.C11
-rw-r--r--gcc/testsuite/g++.dg/compat/pr102024_y.C11
-rw-r--r--gcc/testsuite/gcc.dg/compat/pr102024_main.c22
-rw-r--r--gcc/testsuite/gcc.dg/compat/pr102024_test.h6
-rw-r--r--gcc/testsuite/gcc.dg/compat/pr102024_x.c10
-rw-r--r--gcc/testsuite/gcc.dg/compat/pr102024_y.c10
8 files changed, 102 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/compat/pr102024_main.C b/gcc/testsuite/g++.dg/compat/pr102024_main.C
new file mode 100644
index 0000000..83965c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/compat/pr102024_main.C
@@ -0,0 +1,26 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-options "-Wno-abi" } */
+/* { dg-options "-mno-mmx -Wno-abi" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fno-common" { target hppa*-*-hpux* powerpc*-*-darwin* } } */
+/* { dg-options "-mno-mmx -fno-common -Wno-abi" { target i?86-*-darwin* x86_64-*-darwin* } } */
+/* { dg-options "-mno-base-addresses" { target mmix-*-* } } */
+/* { dg-options "-mlongcalls -mtext-section-literals" { target xtensa*-*-* } } */
+
+#include "struct-layout-1.h"
+
+#define TX(n, type, attrs, fields, ops) extern void test##n (void);
+#include "pr102024_test.h"
+#undef TX
+
+int main (void)
+{
+#define TX(n, type, attrs, fields, ops) test##n ();
+#include "pr102024_test.h"
+#undef TX
+ if (fails)
+ {
+ fflush (stdout);
+ abort ();
+ }
+ exit (0);
+}
diff --git a/gcc/testsuite/g++.dg/compat/pr102024_test.h b/gcc/testsuite/g++.dg/compat/pr102024_test.h
new file mode 100644
index 0000000..d8f4103
--- /dev/null
+++ b/gcc/testsuite/g++.dg/compat/pr102024_test.h
@@ -0,0 +1,6 @@
+T(0,float a;int:0;float b;,F(0,a,42.0f,43.125f)F(0,b,-17.5f,35.75f))
+T(1,float a;int:0;,F(1,a,1.0f,17.125f))
+T(2,int:0;float a;,F(2,a,2.25f,16.5f))
+T(3,double a;long long:0;double b;,F(3,a,42.0,43.125)F(3,b,-17.5,35.75))
+T(4,double a;long long:0;,F(4,a,1.0,17.125))
+T(5,long long:0;double a;,F(5,a,2.25,16.5))
diff --git a/gcc/testsuite/g++.dg/compat/pr102024_x.C b/gcc/testsuite/g++.dg/compat/pr102024_x.C
new file mode 100644
index 0000000..d56ae25
--- /dev/null
+++ b/gcc/testsuite/g++.dg/compat/pr102024_x.C
@@ -0,0 +1,11 @@
+/* { dg-options "-w -Wno-abi" } */
+/* { dg-options "-w -mno-mmx -Wno-abi" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-w -fno-common" { target hppa*-*-hpux* powerpc*-*-darwin* } } */
+/* { dg-options "-w -mno-mmx -fno-common -Wno-abi" { target i?86-*-darwin* x86_64-*-darwin* } } */
+/* { dg-options "-w -mno-base-addresses" { target mmix-*-* } } */
+/* { dg-options "-w -mlongcalls -mtext-section-literals" { target xtensa*-*-* } } */
+
+#include "struct-layout-1_x1.h"
+#include "pr102024_test.h"
+#include "struct-layout-1_x2.h"
+#include "pr102024_test.h"
diff --git a/gcc/testsuite/g++.dg/compat/pr102024_y.C b/gcc/testsuite/g++.dg/compat/pr102024_y.C
new file mode 100644
index 0000000..385f4c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/compat/pr102024_y.C
@@ -0,0 +1,11 @@
+/* { dg-options "-w -Wno-abi" } */
+/* { dg-options "-w -mno-mmx -Wno-abi" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-w -fno-common" { target hppa*-*-hpux* powerpc*-*-darwin* } } */
+/* { dg-options "-w -mno-mmx -fno-common -Wno-abi" { target i?86-*-darwin* x86_64-*-darwin* } } */
+/* { dg-options "-w -mno-base-addresses" { target mmix-*-* } } */
+/* { dg-options "-w -mlongcalls -mtext-section-literals" { target xtensa*-*-* } } */
+
+#include "struct-layout-1_y1.h"
+#include "pr102024_test.h"
+#include "struct-layout-1_y2.h"
+#include "pr102024_test.h"
diff --git a/gcc/testsuite/gcc.dg/compat/pr102024_main.c b/gcc/testsuite/gcc.dg/compat/pr102024_main.c
new file mode 100644
index 0000000..8aa78da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/pr102024_main.c
@@ -0,0 +1,22 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-options "-Wno-abi" } */
+/* { dg-options "-mno-mmx -Wno-abi" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fno-common" { target hppa*-*-hpux* powerpc*-*-darwin* } } */
+/* { dg-options "-mno-mmx -fno-common -Wno-abi" { target i?86-*-darwin* x86_64-*-darwin* } } */
+/* { dg-options "-mno-base-addresses" { target mmix-*-* } } */
+/* { dg-options "-mlongcalls -mtext-section-literals" { target xtensa*-*-* } } */
+/* { dg-prune-output ".*-Wno-abi.*" } */
+/* { dg-prune-output ".*Offset of packed bit-field.*" } */
+#include "struct-layout-1.h"
+
+#define TX(n, type, attrs, fields, ops) extern void test##n (void);
+#include "pr102024_test.h"
+#undef TX
+
+int main (void)
+{
+#define TX(n, type, attrs, fields, ops) test##n ();
+#include "pr102024_test.h"
+#undef TX
+ exit (fails != 0);
+}
diff --git a/gcc/testsuite/gcc.dg/compat/pr102024_test.h b/gcc/testsuite/gcc.dg/compat/pr102024_test.h
new file mode 100644
index 0000000..d8f4103
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/pr102024_test.h
@@ -0,0 +1,6 @@
+T(0,float a;int:0;float b;,F(0,a,42.0f,43.125f)F(0,b,-17.5f,35.75f))
+T(1,float a;int:0;,F(1,a,1.0f,17.125f))
+T(2,int:0;float a;,F(2,a,2.25f,16.5f))
+T(3,double a;long long:0;double b;,F(3,a,42.0,43.125)F(3,b,-17.5,35.75))
+T(4,double a;long long:0;,F(4,a,1.0,17.125))
+T(5,long long:0;double a;,F(5,a,2.25,16.5))
diff --git a/gcc/testsuite/gcc.dg/compat/pr102024_x.c b/gcc/testsuite/gcc.dg/compat/pr102024_x.c
new file mode 100644
index 0000000..de20752
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/pr102024_x.c
@@ -0,0 +1,10 @@
+/* { dg-options "-w -Wno-abi" } */
+/* { dg-options "-w -mno-mmx -Wno-abi" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-w -fno-common" { target hppa*-*-hpux* powerpc*-*-darwin* } } */
+/* { dg-options "-w -mno-mmx -fno-common -Wno-abi" { target i?86-*-darwin* x86_64-*-darwin* } } */
+/* { dg-options "-w -mno-base-addresses" { target mmix-*-* } } */
+/* { dg-options "-w -mlongcalls -mtext-section-literals" { target xtensa*-*-* } } */
+#include "struct-layout-1_x1.h"
+#include "pr102024_test.h"
+#include "struct-layout-1_x2.h"
+#include "pr102024_test.h"
diff --git a/gcc/testsuite/gcc.dg/compat/pr102024_y.c b/gcc/testsuite/gcc.dg/compat/pr102024_y.c
new file mode 100644
index 0000000..a3f8396
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/compat/pr102024_y.c
@@ -0,0 +1,10 @@
+/* { dg-options "-w -Wno-abi" } */
+/* { dg-options "-w -mno-mmx -Wno-abi" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-w -fno-common" { target hppa*-*-hpux* powerpc*-*-darwin* } } */
+/* { dg-options "-w -mno-mmx -fno-common -Wno-abi" { target i?86-*-darwin* x86_64-*-darwin* } } */
+/* { dg-options "-w -mno-base-addresses" { target mmix-*-* } } */
+/* { dg-options "-w -mlongcalls -mtext-section-literals" { target xtensa*-*-* } } */
+#include "struct-layout-1_y1.h"
+#include "pr102024_test.h"
+#include "struct-layout-1_y2.h"
+#include "pr102024_test.h"