aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/autopar/pr46885.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/autopar/pr46885.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/autopar/pr46885.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/autopar/pr46885.c b/gcc-4.9/gcc/testsuite/gcc.dg/autopar/pr46885.c
new file mode 100644
index 000000000..9560c92bf
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/autopar/pr46885.c
@@ -0,0 +1,23 @@
+/* PR debug/46885 */
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-parallelize-loops=4 -fcompare-debug -fno-tree-dominator-opts -funswitch-loops" } */
+
+static inline void
+bar (int i)
+{
+ (void) i;
+}
+
+int
+foo (int *begin, int *end)
+{
+ int s = 0;
+ int *i;
+ for (i = begin; i != end; ++i)
+ {
+ bar (0);
+ if (begin)
+ return s;
+ }
+ return 0;
+}