aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/torture/pr58794-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/torture/pr58794-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/torture/pr58794-2.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/torture/pr58794-2.c b/gcc-4.9/gcc/testsuite/c-c++-common/torture/pr58794-2.c
new file mode 100644
index 000000000..767798806
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/torture/pr58794-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+struct S
+{
+ volatile int f;
+} a;
+
+unsigned int b;
+
+static int *c[1][2] = {{0, (int *)&a.f}};
+static unsigned int d;
+
+int
+main ()
+{
+ for (; d < 1; d++)
+ for (; b < 1; b++)
+ *c[b][d + 1] = 0;
+
+ return 0;
+}