gimple_seq par_rlist = NULL;
lower_rec_input_clauses (clauses, &par_ilist, &par_olist, ctx, NULL);
lower_omp (&par_body, ctx);
- if (gimple_code (stmt) == GIMPLE_OMP_PARALLEL)
+ if (gimple_code (stmt) != GIMPLE_OMP_TASK)
lower_reduction_clauses (clauses, &par_rlist, NULL, ctx);
/* Declare all the variables created by mapping and the variables
#endif
void abort ();
+#define DO_PRAGMA(x) _Pragma (#x)
+#define OMPTEAMS DO_PRAGMA (omp teams)
#define M(x, y, z) O(x, y, z)
#define O(x, y, z) x ## _ ## y ## _ ## z
main ()
{
int err = 0;
- #pragma omp teams reduction(|:err)
- {
- err |= test_d_normal ();
- err |= test_d_ds128_normal ();
- err |= test_ds_normal ();
- err |= test_ds_ds128_normal ();
- err |= test_dpf_static ();
- err |= test_dpf_static32 ();
- err |= test_dpf_auto ();
- err |= test_dpf_guided32 ();
- err |= test_dpf_runtime ();
- err |= test_dpf_ds128_static ();
- err |= test_dpf_ds128_static32 ();
- err |= test_dpf_ds128_auto ();
- err |= test_dpf_ds128_guided32 ();
- err |= test_dpf_ds128_runtime ();
- err |= test_dpfs_static ();
- err |= test_dpfs_static32 ();
- err |= test_dpfs_auto ();
- err |= test_dpfs_guided32 ();
- err |= test_dpfs_runtime ();
- err |= test_dpfs_ds128_static ();
- err |= test_dpfs_ds128_static32 ();
- err |= test_dpfs_ds128_auto ();
- err |= test_dpfs_ds128_guided32 ();
- err |= test_dpfs_ds128_runtime ();
- }
+ err |= test_d_normal ();
+ err |= test_d_ds128_normal ();
+ err |= test_ds_normal ();
+ err |= test_ds_ds128_normal ();
+ err |= test_dpf_static ();
+ err |= test_dpf_static32 ();
+ err |= test_dpf_auto ();
+ err |= test_dpf_guided32 ();
+ err |= test_dpf_runtime ();
+ err |= test_dpf_ds128_static ();
+ err |= test_dpf_ds128_static32 ();
+ err |= test_dpf_ds128_auto ();
+ err |= test_dpf_ds128_guided32 ();
+ err |= test_dpf_ds128_runtime ();
+ err |= test_dpfs_static ();
+ err |= test_dpfs_static32 ();
+ err |= test_dpfs_auto ();
+ err |= test_dpfs_guided32 ();
+ err |= test_dpfs_runtime ();
+ err |= test_dpfs_ds128_static ();
+ err |= test_dpfs_ds128_static32 ();
+ err |= test_dpfs_ds128_auto ();
+ err |= test_dpfs_ds128_guided32 ();
+ err |= test_dpfs_ds128_runtime ();
if (err)
abort ();
return 0;
#ifndef OMPTGT
#define OMPTGT
#endif
+#ifndef OMPTEAMS
+#define OMPTEAMS
+#endif
#ifndef OMPTO
#define OMPTO(v) do {} while (0)
#endif
for (i = 0; i < 1500; i++)
a[i] = i - 25;
OMPTO (a);
+ OMPTEAMS
N(f0) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 23)
return 1;
+ OMPTEAMS
N(f1) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 25)
return 1;
+ OMPTEAMS
N(f2) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 29)
return 1;
+ OMPTEAMS
N(f3) (1500LL - 1 - 23 - 48, -1LL + 25 - 48, 1LL);
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 22)
return 1;
+ OMPTEAMS
N(f3) (1500LL - 1 - 23 - 48, 1500LL - 1, 7LL);
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 22)
return 1;
+ OMPTEAMS
N(f4) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
for (k = 0; k < 10; k++)
b[i][j][k] = i - 2.5 + 1.5 * j - 1.5 * k;
OMPTO (b);
+ OMPTEAMS
N(f5) (0, 10, 0, 15, 0, 10, 1, 1, 1);
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f5) (0, 10, 30, 15, 0, 10, 4, 5, 6);
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f6) (9, -1, 29, 0, 9, -1, -1, -2, -1);
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i - 4.5 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f7) ();
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.0 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f8) ();
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.0 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f9) ();
+ OMPTEAMS
N(f10) ();
+ OMPTEAMS
N(f11) (10);
+ OMPTEAMS
N(f12) (12);
OMPFROM (a);
OMPFROM (b);
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.0 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f13) ();
+ OMPTEAMS
N(f14) ();
OMPFROM (a);
OMPFROM (b);
for (i = 0; i < 1500; i++)
a[i] = i - 25;
OMPTO (a);
+ OMPTEAMS
N(f20) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 23)
return 1;
+ OMPTEAMS
N(f21) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 25)
return 1;
+ OMPTEAMS
N(f22) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 29)
return 1;
+ OMPTEAMS
N(f23) (1500LL - 1 - 23 - 48, -1LL + 25 - 48);
OMPFROM (a);
for (i = 0; i < 1500; i++)
if (a[i] != i - 22)
return 1;
+ OMPTEAMS
N(f24) ();
OMPFROM (a);
for (i = 0; i < 1500; i++)
for (k = 0; k < 10; k++)
b[i][j][k] = i - 2.5 + 1.5 * j - 1.5 * k;
OMPTO (b);
+ OMPTEAMS
N(f25) (0, 10, 0, 15, 0, 10, 1);
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f25) (0, 10, 30, 15, 0, 10, 5);
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f26) (9, -1, 29, 0, 9, -1, -2);
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i - 4.5 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f27) ();
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.0 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f28) ();
OMPFROM (b);
for (i = 0; i < 10; i++)
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.0 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f29) ();
+ OMPTEAMS
N(f30) ();
+ OMPTEAMS
N(f31) (20);
+ OMPTEAMS
N(f32) (12);
OMPFROM (a);
OMPFROM (b);
for (k = 0; k < 10; k++)
if (b[i][j][k] != i + 1.0 + 1.5 * j - 1.5 * k)
return 1;
+ OMPTEAMS
N(f33) ();
+ OMPTEAMS
N(f34) ();
OMPFROM (a);
OMPFROM (b);
--- /dev/null
+/* PR middle-end/96459 */
+
+#include <stdlib.h>
+
+int
+main ()
+{
+ int niters = 0, i, j, k;
+ #pragma omp teams reduction(+:niters)
+ {
+ #pragma omp distribute collapse(3)
+ for (i = 0; i < 3; i++)
+ for (j = 0; j < 8; j += 2)
+ for (k = 0; k < 25; k += 3)
+ niters++;
+ }
+ if (niters != 108)
+ abort ();
+ return 0;
+}