aboutsummaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2013-05-16 12:43:33 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2013-05-16 12:43:33 +0200
commit5a0f4dd39504905e6c72bd59b6bcecd264fbcb9c (patch)
treebb79795b8f80069dd0b22d37e59aa3d81ee9f34d /libgomp
parente3753785835fdb4c96f901c7d158a38b1c5c2f78 (diff)
downloadgcc-5a0f4dd39504905e6c72bd59b6bcecd264fbcb9c.zip
gcc-5a0f4dd39504905e6c72bd59b6bcecd264fbcb9c.tar.gz
gcc-5a0f4dd39504905e6c72bd59b6bcecd264fbcb9c.tar.bz2
omp-low.c (extract_omp_for_data): For collapsed loops...
* omp-low.c (extract_omp_for_data): For collapsed loops, if at least one of the loops is known at compile time to iterate zero times, set count to 0. (expand_omp_regimplify_p): New function. (expand_omp_for_generic): For collapsed loops, if at least one of the loops isn't known to iterate at least once, add runtime check with setting count to 0. (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): For unsigned types if it isn't known at compile time that the loop will iterate at least once, add runtime check to bypass the whole loop if initial condition isn't true. * testsuite/libgomp.c/loop-13.c: New test. * testsuite/libgomp.c/loop-14.c: New test. * testsuite/libgomp.c/loop-15.c: New test. * testsuite/libgomp.c++/loop-13.C: New test. * testsuite/libgomp.c++/loop-14.C: New test. * testsuite/libgomp.c++/loop-15.C: New test. From-SVN: r198966
Diffstat (limited to 'libgomp')
-rw-r--r--libgomp/ChangeLog9
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-13.C3
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-14.C3
-rw-r--r--libgomp/testsuite/libgomp.c++/loop-15.C3
-rw-r--r--libgomp/testsuite/libgomp.c/loop-13.c253
-rw-r--r--libgomp/testsuite/libgomp.c/loop-14.c253
-rw-r--r--libgomp/testsuite/libgomp.c/loop-15.c253
7 files changed, 777 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog
index b0dc764..8b81b27 100644
--- a/libgomp/ChangeLog
+++ b/libgomp/ChangeLog
@@ -1,3 +1,12 @@
+2013-05-16 Jakub Jelinek <jakub@redhat.com>
+
+ * testsuite/libgomp.c/loop-13.c: New test.
+ * testsuite/libgomp.c/loop-14.c: New test.
+ * testsuite/libgomp.c/loop-15.c: New test.
+ * testsuite/libgomp.c++/loop-13.C: New test.
+ * testsuite/libgomp.c++/loop-14.C: New test.
+ * testsuite/libgomp.c++/loop-15.C: New test.
+
2013-02-06 Jakub Jelinek <jakub@redhat.com>
PR middle-end/56217
diff --git a/libgomp/testsuite/libgomp.c++/loop-13.C b/libgomp/testsuite/libgomp.c++/loop-13.C
new file mode 100644
index 0000000..31572be
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/loop-13.C
@@ -0,0 +1,3 @@
+/* { dg-do run } */
+
+#include "../libgomp.c/loop-13.c"
diff --git a/libgomp/testsuite/libgomp.c++/loop-14.C b/libgomp/testsuite/libgomp.c++/loop-14.C
new file mode 100644
index 0000000..ba2856a
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/loop-14.C
@@ -0,0 +1,3 @@
+/* { dg-do run } */
+
+#include "../libgomp.c/loop-14.c"
diff --git a/libgomp/testsuite/libgomp.c++/loop-15.C b/libgomp/testsuite/libgomp.c++/loop-15.C
new file mode 100644
index 0000000..9bde48e
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c++/loop-15.C
@@ -0,0 +1,3 @@
+/* { dg-do run } */
+
+#include "../libgomp.c/loop-15.c"
diff --git a/libgomp/testsuite/libgomp.c/loop-13.c b/libgomp/testsuite/libgomp.c/loop-13.c
new file mode 100644
index 0000000..997c628
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/loop-13.c
@@ -0,0 +1,253 @@
+/* { dg-do run } */
+
+volatile int ji = 100, ki = 2;
+volatile unsigned int ju = 100, ku = 2;
+volatile long long int jll = 100, kll = 2;
+volatile unsigned long long int jull = 100, kull = 2;
+unsigned long long l;
+
+void
+f0 (void)
+{
+ int i, j, k;
+ unsigned int j2, k2;
+ #pragma omp for reduction(+: l)
+ for (i = ji; i < ki; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l)
+ for (i = ji; i < ki; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ji; i < ki; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ji; i < ki; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = ki + 10; k < ji - 10; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = ki + 10; j < ji - 10; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f1 (void)
+{
+ unsigned int i, j, k;
+ int j2, k2;
+ #pragma omp for reduction(+: l)
+ for (i = ju; i < ku; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l)
+ for (i = ju; i < ku; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ju; i < ku; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ju; i < ku; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = ku; k < ju; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = ku; j < ju; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f2 (void)
+{
+ long long int i, j, k;
+ unsigned long long int j2, k2;
+ #pragma omp for reduction(+: l)
+ for (i = jll; i < kll; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l)
+ for (i = jll; i < kll; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jll; i < kll; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jll; i < kll; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = kll; k < jll; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = kll; j < jll; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f3 (void)
+{
+ unsigned long long int i, j, k;
+ long long int j2, k2;
+ #pragma omp for reduction(+: l)
+ for (i = jull; i < kull; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l)
+ for (i = jull; i < kull; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jull; i < kull; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jull; i < kull; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = kull; k < jull; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3)
+ for (j = kull; j < jull; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ f0 ();
+ f1 ();
+ f2 ();
+ f3 ();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/loop-14.c b/libgomp/testsuite/libgomp.c/loop-14.c
new file mode 100644
index 0000000..b8a163c
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/loop-14.c
@@ -0,0 +1,253 @@
+/* { dg-do run } */
+
+volatile int ji = 100, ki = 2;
+volatile unsigned int ju = 100, ku = 2;
+volatile long long int jll = 100, kll = 2;
+volatile unsigned long long int jull = 100, kull = 2;
+unsigned long long l;
+
+void
+f0 (void)
+{
+ int i, j, k;
+ unsigned int j2, k2;
+ #pragma omp for reduction(+: l) schedule(static, 2)
+ for (i = ji; i < ki; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(static, 2)
+ for (i = ji; i < ki; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ji; i < ki; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ji; i < ki; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = ki + 10; k < ji - 10; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = ki + 10; j < ji - 10; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f1 (void)
+{
+ unsigned int i, j, k;
+ int j2, k2;
+ #pragma omp for reduction(+: l) schedule(static, 2)
+ for (i = ju; i < ku; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(static, 2)
+ for (i = ju; i < ku; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ju; i < ku; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ju; i < ku; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = ku; k < ju; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = ku; j < ju; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f2 (void)
+{
+ long long int i, j, k;
+ unsigned long long int j2, k2;
+ #pragma omp for reduction(+: l) schedule(static, 2)
+ for (i = jll; i < kll; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(static, 2)
+ for (i = jll; i < kll; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jll; i < kll; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jll; i < kll; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = kll; k < jll; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = kll; j < jll; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f3 (void)
+{
+ unsigned long long int i, j, k;
+ long long int j2, k2;
+ #pragma omp for reduction(+: l) schedule(static, 2)
+ for (i = jull; i < kull; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(static, 2)
+ for (i = jull; i < kull; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jull; i < kull; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jull; i < kull; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = kull; k < jull; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(static, 2)
+ for (j = kull; j < jull; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ f0 ();
+ f1 ();
+ f2 ();
+ f3 ();
+ return 0;
+}
diff --git a/libgomp/testsuite/libgomp.c/loop-15.c b/libgomp/testsuite/libgomp.c/loop-15.c
new file mode 100644
index 0000000..e7cf3fc
--- /dev/null
+++ b/libgomp/testsuite/libgomp.c/loop-15.c
@@ -0,0 +1,253 @@
+/* { dg-do run } */
+
+volatile int ji = 100, ki = 2;
+volatile unsigned int ju = 100, ku = 2;
+volatile long long int jll = 100, kll = 2;
+volatile unsigned long long int jull = 100, kull = 2;
+unsigned long long l;
+
+void
+f0 (void)
+{
+ int i, j, k;
+ unsigned int j2, k2;
+ #pragma omp for reduction(+: l) schedule(runtime)
+ for (i = ji; i < ki; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(runtime)
+ for (i = ji; i < ki; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ji; i < ki; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ji; i < ki; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = ji; i < ki; i++)
+ for (k = ki + 10; k < ji - 10; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = ki + 10; j < ji - 10; j++)
+ for (i = ji; i < ki; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f1 (void)
+{
+ unsigned int i, j, k;
+ int j2, k2;
+ #pragma omp for reduction(+: l) schedule(runtime)
+ for (i = ju; i < ku; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(runtime)
+ for (i = ju; i < ku; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ju; i < ku; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = ju; i < ku; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = ju; i < ku; i++)
+ for (k = ku; k < ju; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = ku; j < ju; j++)
+ for (i = ju; i < ku; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f2 (void)
+{
+ long long int i, j, k;
+ unsigned long long int j2, k2;
+ #pragma omp for reduction(+: l) schedule(runtime)
+ for (i = jll; i < kll; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(runtime)
+ for (i = jll; i < kll; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jll; i < kll; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jll; i < kll; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = jll; i < kll; i++)
+ for (k = kll; k < jll; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = kll; j < jll; j++)
+ for (i = jll; i < kll; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+void
+f3 (void)
+{
+ unsigned long long int i, j, k;
+ long long int j2, k2;
+ #pragma omp for reduction(+: l) schedule(runtime)
+ for (i = jull; i < kull; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) schedule(runtime)
+ for (i = jull; i < kull; i++)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jull; i < kull; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j2 = 0; j2 < 4; j2++)
+ for (i = jull; i < kull; i++)
+ for (k2 = 0; k2 < 5; k2 += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = 0; j < 4; j++)
+ for (i = jull; i < kull; i++)
+ for (k = kull; k < jull; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+ #pragma omp parallel for reduction(+: l) collapse(3) schedule(runtime)
+ for (j = kull; j < jull; j++)
+ for (i = jull; i < kull; i++)
+ for (k = 0; k < 5; k += 2)
+ l++;
+ if (l != 0)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ f0 ();
+ f1 ();
+ f2 ();
+ f3 ();
+ return 0;
+}