summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.target/s390/pr102024-3.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.target/s390/pr102024-3.C')
-rw-r--r--gcc/testsuite/g++.target/s390/pr102024-3.C15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.target/s390/pr102024-3.C b/gcc/testsuite/g++.target/s390/pr102024-3.C
new file mode 100644
index 00000000000..51514c3fcf5
--- /dev/null
+++ b/gcc/testsuite/g++.target/s390/pr102024-3.C
@@ -0,0 +1,15 @@
+// PR target/102024
+// { dg-do compile }
+
+/* struct S would not be passed as single value anyway so no warning expected. */
+
+struct T { float a; float b; };
+struct S { struct T t; int :0; };
+void foo (struct S x);
+
+void
+bar (void)
+{
+ struct S s = { { 0.0f, 0.0f } };
+ foo (s); // { dg-bogus "with zero-width bit fields members changed in GCC 12" }
+}