diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr54363.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr54363.c | 12 |
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" } }; +} |