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	  call abort
11	!$omp section
12	  !$omp cancel sections
13	  call abort
14	!$omp section
15	  !$omp cancel sections
16	  call abort
17	!$omp section
18	  !$omp cancel sections
19	  call abort
20      !$omp end sections
21    !$omp end parallel
22  end if
23end
24