summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr33670.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr33670.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr33670.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr33670.c b/gcc/testsuite/gcc.dg/pr33670.c
new file mode 100644
index 000000000..5232af965
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr33670.c
@@ -0,0 +1,19 @@
+/* PR middle-end/33670 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fsched-stalled-insns=0" } */
+
+struct B
+{
+ int p;
+ int n;
+};
+extern struct B ***b;
+extern int a;
+
+int
+foo (int d, int e)
+{
+ int c;
+ for (c = d; c <= e; c++)
+ b[a][c]->n = b[a][c]->p;
+}