blob: e0cef0b6ea7ea1fe378554b3d8cce1684145ed76 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
/* { dg-do run } */
/* { dg-set-target-env-var OMP_CANCELLATION "true" } */
#include <stdlib.h>
#include <omp.h>
int
main ()
{
if (!omp_get_cancellation ())
return 0;
#pragma omp parallel num_threads (32)
{
#pragma omp sections
{
{
#pragma omp cancel sections
abort ();
}
#pragma omp section
{
#pragma omp cancel sections
abort ();
}
#pragma omp section
{
#pragma omp cancel sections
abort ();
}
#pragma omp section
{
#pragma omp cancel sections
abort ();
}
}
}
return 0;
}
|