summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr54363.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr54363.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr54363.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr54363.c b/gcc/testsuite/gcc.dg/pr54363.c
new file mode 100644
index 000000000..aea0f9057
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54363.c
@@ -0,0 +1,12 @@
+/* PR c/54363 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+struct S { char **a; };
+
+void
+test (void)
+{
+ struct S b = { .a = (char **) { "a", "b" } }; /* { dg-warning "(initialization|excess elements)" } */
+ struct S c = { .a = (char *[]) { "a", "b" } };
+}