summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr39455.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr39455.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr39455.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr39455.c b/gcc/testsuite/gcc.dg/pr39455.c
new file mode 100644
index 000000000..8e8c67034
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39455.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/39455 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprefetch-loop-arrays -w" } */
+
+void
+foo (char *x, unsigned long y, unsigned char *z)
+{
+ unsigned int c[256], *d;
+
+ for (d = c + 1; d < c + 256; ++d)
+ *d += d[-1];
+ x[--c[z[y]]] = 0;
+}