aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/init-5.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/c-c++-common/init-5.c')
-rw-r--r--gcc/testsuite/c-c++-common/init-5.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/init-5.c b/gcc/testsuite/c-c++-common/init-5.c
new file mode 100644
index 0000000..61b6cdb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/init-5.c
@@ -0,0 +1,19 @@
+/* PR c/117190 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+struct S { char d[]; } v = {
+{ 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, }
+};
+
+int
+main ()
+{
+ for (int i = 0; i < 65; ++i)
+ if (v.d[i] != (i == 0 ? 8 : 0))
+ __builtin_abort ();
+}