summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/init-bad-6.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/init-bad-6.c')
-rw-r--r--gcc/testsuite/gcc.dg/init-bad-6.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/init-bad-6.c b/gcc/testsuite/gcc.dg/init-bad-6.c
new file mode 100644
index 000000000..8235f5d96
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/init-bad-6.c
@@ -0,0 +1,12 @@
+/* ICE arising from bug computing composite type of zero-length array
+ types: PR 35433. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+typedef int* X;
+typedef int* Y;
+
+X (*p)[][0];
+Y (*q)[][0];
+
+typeof(*(0 ? p : q)) x = { 0 }; /* { dg-warning "excess elements in array initializer|near initialization" } */