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
46 lines
784 B
C
46 lines
784 B
C
/* { dg-do run } */
|
|
|
|
#include <omp.h>
|
|
#include <stdlib.h>
|
|
|
|
int serr;
|
|
|
|
int
|
|
main ()
|
|
{
|
|
int e;
|
|
#pragma omp parallel shared(serr)
|
|
{
|
|
if (omp_in_final ())
|
|
#pragma omp atomic write
|
|
serr = 1;
|
|
#pragma omp task if (0) shared(serr)
|
|
{
|
|
if (omp_in_final ())
|
|
#pragma omp atomic write
|
|
serr = 1;
|
|
#pragma omp task if (0) shared(serr)
|
|
if (omp_in_final ())
|
|
#pragma omp atomic write
|
|
serr = 1;
|
|
}
|
|
#pragma omp task final (1) shared(serr)
|
|
{
|
|
if (!omp_in_final ())
|
|
#pragma omp atomic write
|
|
serr = 1;
|
|
#pragma omp taskyield
|
|
#pragma omp taskwait
|
|
#pragma omp task shared(serr)
|
|
if (!omp_in_final ())
|
|
#pragma omp atomic write
|
|
serr = 1;
|
|
}
|
|
}
|
|
#pragma omp atomic read
|
|
e = serr;
|
|
if (e)
|
|
abort ();
|
|
return 0;
|
|
}
|