Retro68/gcc/libgomp/testsuite/libgomp.c++/cancel-sections-1.C
2014-09-21 19:33:12 +02:00

44 lines
600 B
C

// { dg-do run }
// { dg-set-target-env-var OMP_CANCELLATION "true" }
#include <omp.h>
#include "cancel-test.h"
int
main ()
{
if (!omp_get_cancellation ())
return 0;
#pragma omp parallel num_threads (32)
{
S a;
#pragma omp sections
{
{
S b;
#pragma omp cancel sections
abort ();
}
#pragma omp section
{
S c;
#pragma omp cancel sections
abort ();
}
#pragma omp section
{
S d;
#pragma omp cancel sections
abort ();
}
#pragma omp section
{
S e;
#pragma omp cancel sections
abort ();
}
}
}
S::verify ();
}