92243e7cea
2018-05-02 Tom de Vries <tom@codesourcery.com> PR testsuite/83791 * testsuite/libgomp.c++/udr-9.C: Update. * testsuite/libgomp.c++/atomic-16.C: Remove. * testsuite/libgomp.c++/cancel-taskgroup-2.C: Remove. * testsuite/libgomp.c++/loop-13.C: Remove. * testsuite/libgomp.c++/loop-14.C: Remove. * testsuite/libgomp.c++/loop-15.C: Remove. * testsuite/libgomp.c++/monotonic-1.C: Remove. * testsuite/libgomp.c++/monotonic-2.C: Remove. * testsuite/libgomp.c++/nonmonotonic-1.C: Remove. * testsuite/libgomp.c++/nonmonotonic-2.C: Remove. * testsuite/libgomp.c++/ordered-1.C: Remove. * testsuite/libgomp.c++/pr45784.C: Remove. * testsuite/libgomp.c++/pr64824.C: Remove. * testsuite/libgomp.c++/pr64868.C: Remove. * testsuite/libgomp.c++/pr66199-1.C: Remove. * testsuite/libgomp.c++/pr66199-2.C: Remove. * testsuite/libgomp.c++/pr66199-3.C: Remove. * testsuite/libgomp.c++/pr66199-4.C: Remove. * testsuite/libgomp.c++/pr66199-5.C: Remove. * testsuite/libgomp.c++/pr66199-6.C: Remove. * testsuite/libgomp.c++/pr66199-7.C: Remove. * testsuite/libgomp.c++/pr66199-8.C: Remove. * testsuite/libgomp.c++/pr66199-9.C: Remove. * testsuite/libgomp.c++/pr69389.C: Remove. * testsuite/libgomp.c++/simd10.C: Remove. * testsuite/libgomp.c++/simd11.C: Remove. * testsuite/libgomp.c++/simd12.C: Remove. * testsuite/libgomp.c++/simd13.C: Remove. * testsuite/libgomp.c++/target-1.C: Remove. * testsuite/libgomp.c++/target-3.C: Remove. * testsuite/libgomp.c++/target-4.C: Remove. * testsuite/libgomp.c++/target-5.C: Remove. * testsuite/libgomp.c++/taskgroup-1.C: Remove. * testsuite/libgomp.c++/taskloop-1.C: Remove. * testsuite/libgomp.c++/taskloop-2.C: Remove. * testsuite/libgomp.c++/taskloop-3.C: Remove. * testsuite/libgomp.c++/taskloop-4.C: Remove. * testsuite/libgomp.c++/udr-9.C: Remove. * testsuite/libgomp.c++/for-10.C: Remove. * testsuite/libgomp.c++/for-11.C: Remove. * testsuite/libgomp.c++/for-12.C: Remove. * testsuite/libgomp.c++/for-13.C: Remove. * testsuite/libgomp.c++/for-14.C: Remove. * testsuite/libgomp.c++/for-9.C: Remove. * testsuite/libgomp.c/atomic-18.c: Move ... * testsuite/libgomp.c-c++-common/atomic-18.c: ... here. * testsuite/libgomp.c/cancel-taskgroup-2.c: Move ... * testsuite/libgomp.c-c++-common/cancel-taskgroup-2.c: here. * testsuite/libgomp.c/loop-13.c: Move ... * testsuite/libgomp.c-c++-common/loop-13.c: ... here. * testsuite/libgomp.c/loop-14.c: Move ... * testsuite/libgomp.c-c++-common/loop-14.c: ... here. * testsuite/libgomp.c/loop-15.c: Remove. * testsuite/libgomp.c-c++-common/loop-15.c: New test. * testsuite/libgomp.c/monotonic-1.c: Move ... * testsuite/libgomp.c-c++-common/monotonic-1.c: ... here. * testsuite/libgomp.c/monotonic-2.c: Move ... * testsuite/libgomp.c-c++-common/monotonic-2.c: ... here. * testsuite/libgomp.c/nonmonotonic-1.c: Move ... * testsuite/libgomp.c-c++-common/nonmonotonic-1.c: ... here. * testsuite/libgomp.c/nonmonotonic-2.c: Move ... * testsuite/libgomp.c-c++-common/nonmonotonic-2.c: ... here. * testsuite/libgomp.c/ordered-4.c: Move ... * testsuite/libgomp.c-c++-common/ordered-4.c: ... here. * testsuite/libgomp.c/pr45784.c: Move ... * testsuite/libgomp.c-c++-common/pr45784.c: ... here. * testsuite/libgomp.c/pr64824.c: Move ... * testsuite/libgomp.c-c++-common/pr64824.c: ... here. * testsuite/libgomp.c/pr64868.c: Move ... * testsuite/libgomp.c-c++-common/pr64868.c: ... here. * testsuite/libgomp.c/pr66199-1.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-1.c: ... here. * testsuite/libgomp.c/pr66199-2.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-2.c: ... here. * testsuite/libgomp.c/pr66199-3.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-3.c: ... here. * testsuite/libgomp.c/pr66199-4.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-4.c: ... here. * testsuite/libgomp.c/pr66199-5.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-5.c: ... here. * testsuite/libgomp.c/pr66199-6.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-6.c: ... here. * testsuite/libgomp.c/pr66199-7.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-7.c: ... here. * testsuite/libgomp.c/pr66199-8.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-8.c: ... here. * testsuite/libgomp.c/pr66199-9.c: Move ... * testsuite/libgomp.c-c++-common/pr66199-9.c: ... here. * testsuite/libgomp.c/pr69389.c: Move ... * testsuite/libgomp.c-c++-common/pr69389.c: ... here. * testsuite/libgomp.c/simd-14.c: Move ... * testsuite/libgomp.c-c++-common/simd-14.c: ... here. * testsuite/libgomp.c/simd-15.c: Move ... * testsuite/libgomp.c-c++-common/simd-15.c: ... here. * testsuite/libgomp.c/simd-16.c: Move ... * testsuite/libgomp.c-c++-common/simd-16.c: ... here. * testsuite/libgomp.c/simd-17.c: Move ... * testsuite/libgomp.c-c++-common/simd-17.c: ... here. * testsuite/libgomp.c/target-1.c: Move ... * testsuite/libgomp.c-c++-common/target-1.c: ... here. * testsuite/libgomp.c/target-10.c: Move ... * testsuite/libgomp.c-c++-common/target-10.c: ... here. * testsuite/libgomp.c/target-13.c: Move ... * testsuite/libgomp.c-c++-common/target-13.c: ... here. * testsuite/libgomp.c/target-2.c: Move ... * testsuite/libgomp.c-c++-common/target-2.c: ... here. * testsuite/libgomp.c/taskgroup-1.c: Move ... * testsuite/libgomp.c-c++-common/taskgroup-1.c: ... here. * testsuite/libgomp.c/taskloop-1.c: Move ... * testsuite/libgomp.c-c++-common/taskloop-1.c: ... here. * testsuite/libgomp.c/taskloop-2.c: Move ... * testsuite/libgomp.c-c++-common/taskloop-2.c: ... here. * testsuite/libgomp.c/taskloop-3.c: Move ... * testsuite/libgomp.c-c++-common/taskloop-3.c: ... here. * testsuite/libgomp.c/taskloop-4.c: Move ... * testsuite/libgomp.c-c++-common/taskloop-4.c: ... here. * testsuite/libgomp.c/udr-1.c: Move ... * testsuite/libgomp.c-c++-common/udr-1.c: ... here. * testsuite/libgomp.c/for-1.c: Move ... * testsuite/libgomp.c-c++-common/for-1.c: ... here. * testsuite/libgomp.c/for-1.h: Move ... * testsuite/libgomp.c-c++-common/for-1.h: ... here. * testsuite/libgomp.c/for-2.c: Move ... * testsuite/libgomp.c-c++-common/for-2.c: ... here. * testsuite/libgomp.c/for-2.h: Move ... * testsuite/libgomp.c-c++-common/for-2.h: ... here. * testsuite/libgomp.c/for-3.c: Move ... * testsuite/libgomp.c-c++-common/for-3.c: ... here. * testsuite/libgomp.c/for-4.c: Move ... * testsuite/libgomp.c-c++-common/for-4.c: ... here. * testsuite/libgomp.c/for-5.c: Move ... * testsuite/libgomp.c-c++-common/for-5.c: ... here. * testsuite/libgomp.c/for-6.c: Move ... * testsuite/libgomp.c-c++-common/for-6.c: ... here. From-SVN: r259851
254 lines
5.9 KiB
C
254 lines
5.9 KiB
C
/* { 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;
|
|
}
|