summaryrefslogtreecommitdiff
path: root/libgomp
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-16 10:43:33 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2013-05-16 10:43:33 +0000
commit8e6b4515ce79ba3656424dd3b5aaa23e3c3b9236 (patch)
treebb79795b8f80069dd0b22d37e59aa3d81ee9f34d /libgomp
parent5c62c52af38b00da95829f6034136950f9b91d09 (diff)
downloadgcc-8e6b4515ce79ba3656424dd3b5aaa23e3c3b9236.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198966 138bc75d-0d04-0410-961f-82ee72b054a4
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 b0dc764c9c1..8b81b27f934 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 00000000000..31572be0f26
--- /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 00000000000..ba2856ac105
--- /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 00000000000..9bde48e3ac8
--- /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 00000000000..997c628fae6
--- /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 00000000000..b8a163c3cc7
--- /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 00000000000..e7cf3fc4699
--- /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;
+}