b8e724465b
gcc/testsuite: * gcc.c-torture/execute/20030913-1.c: Rename glob to g. * gcc.c-torture/execute/960218-1.c: Rename glob to gl. * gcc.c-torture/execute/complex-6.c: Rename err to e. * gcc.dg/torture/ssa-pta-fn-1.c: Rename glob to g. libgomp: * testsuite/libgomp.c/pr39591-1.c: Rename err to e. * testsuite/libgomp.c/pr39591-2.c: Likewise. * testsuite/libgomp.c/pr39591-3.c: Likewise. * testsuite/libgomp.c/private-1.c: Likewise. * testsuite/libgomp.c/task-1.c: Likewise. * testsuite/libgomp.c/task-5.c: Renamed err to serr. From-SVN: r278571
40 lines
516 B
C
40 lines
516 B
C
/* PR other/39591 */
|
|
/* { dg-do run } */
|
|
|
|
extern void abort (void);
|
|
|
|
int e, a[40];
|
|
|
|
void __attribute__((noinline))
|
|
foo (int *array)
|
|
{
|
|
#pragma omp task
|
|
{
|
|
int j;
|
|
for (j = 0; j < 40; j++)
|
|
if (array[j] != 0x55555555)
|
|
#pragma omp atomic
|
|
e++;
|
|
}
|
|
}
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
int k;
|
|
for (k = 0; k < sizeof a / sizeof a[0]; k++)
|
|
a[k] = 0x55555555;
|
|
|
|
#pragma omp parallel
|
|
{
|
|
int i;
|
|
|
|
#pragma omp for schedule (dynamic)
|
|
for (i = 0; i < 50; i++)
|
|
foo (a);
|
|
}
|
|
if (e)
|
|
abort ();
|
|
return 0;
|
|
}
|