aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr52943.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr52943.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr52943.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr52943.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr52943.c
new file mode 100644
index 000000000..da35c9d18
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr52943.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+extern void abort (void);
+int a[] = { 0, 0, 0, 6 };
+
+int b;
+int
+main ()
+{
+ for (;;)
+ {
+ b = 3;
+ for (; b; b -= 1)
+ a[b] = a[3] > 1;
+ break;
+ }
+ if (a[1] != 0)
+ abort ();
+ return 0;
+}