summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr47684.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr47684.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr47684.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr47684.c b/gcc/testsuite/gcc.dg/pr47684.c
new file mode 100644
index 000000000..475aa1549
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr47684.c
@@ -0,0 +1,20 @@
+/* PR debug/47684 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcompare-debug" } */
+
+int in[8][4];
+int out[4];
+
+void
+foo (void)
+{
+ int sum = 1;
+ int i, j, k;
+ for (k = 0; k < 4; k++)
+ {
+ for (j = 0; j < 4; j++)
+ for (i = 0; i < 4; i++)
+ sum *= in[i + k][j];
+ out[k] = sum;
+ }
+}