aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/gnu89-init-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/gnu89-init-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/gnu89-init-3.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/gnu89-init-3.c b/gcc/testsuite/gcc.dg/gnu89-init-3.c
new file mode 100644
index 00000000000..bd4283ec875
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gnu89-init-3.c
@@ -0,0 +1,18 @@
+/* PR 11527 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu89" } */
+
+typedef struct smrdd_memory_blocks_s
+{
+ int blocks;
+ int block[];
+} smrdd_memory_blocks_t;
+
+const smrdd_memory_blocks_t smrdd_memory_blocks =
+{
+ 3,
+ {
+ [5] = 5,
+ [1] = 2,
+ }
+};