summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr45913.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr45913.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr45913.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr45913.c b/gcc/testsuite/gcc.target/i386/pr45913.c
new file mode 100644
index 000000000..46b9c66f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr45913.c
@@ -0,0 +1,23 @@
+/* PR target/45913 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fselective-scheduling2 -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops" } */
+
+extern void bar (int, int);
+
+int ss[128];
+
+void
+foo (int i, int j, int k, int *p1, int *p2)
+{
+ int s[128];
+ __builtin_memcpy (s, ss, sizeof s);
+
+ while (i--)
+ {
+ int a = s[i];
+ while (j--)
+ bar (k, p2[a]);
+ j = s[i] & 0xFF;
+ bar (p1[a], k);
+ }
+}