aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr103615.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/torture/pr103615.c b/gcc/testsuite/gcc.dg/torture/pr103615.c
new file mode 100644
index 0000000..2109245
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr103615.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+
+int z = 5;
+int a[6] = { 0, 0, 0, 0, 0, 1 };
+int main()
+{
+ for (int x = 5; x; x--)
+ for (int y = z; y >= x; y--)
+ a[y - x] += a[y];
+ if (a[0] != 7)
+ __builtin_abort ();
+ return 0;
+}