1! { dg-do run }
2! { dg-set-target-env-var OMP_CANCELLATION "true" }
3
4  use omp_lib
5
6  if (omp_get_cancellation ()) then
7    !$omp parallel num_threads(32)
8      !$omp sections
9	  !$omp cancel sections
10	  stop 1
11	!$omp section
12	  !$omp cancel sections
13	  stop 2
14	!$omp section
15	  !$omp cancel sections
16	  stop 3
17	!$omp section
18	  !$omp cancel sections
19	  stop 4
20      !$omp end sections
21    !$omp end parallel
22  end if
23end
24