blob: 81a9c352018cfac4f2e11bd486d96a17e825d140 (
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
39
40
41
42
43
|
// { 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 ();
}
|