aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr60823-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr60823-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr60823-1.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr60823-1.c b/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr60823-1.c
new file mode 100644
index 000000000..5f985724d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/gomp/pr60823-1.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/60823 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp-simd" } */
+
+#pragma omp declare simd simdlen(4) notinbranch
+int
+foo (const double c1, const double c2)
+{
+ double z1 = c1, z2 = c2;
+ int res = 100, i;
+
+ for (i = 0; i < 100; i++)
+ {
+ res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res;
+ z1 = c1 + z1 * z1 - z2 * z2;
+ z2 = c2 + 2.0 * z1 * z2;
+ }
+ return res;
+}