1module m
2  implicit none (type, external)
3
4  interface
5  integer function fn(i); integer :: i; end
6  end interface
7
8contains
9
10subroutine foo
11  !$omp teams num_teams (4 : 6)
12  !$omp end teams
13
14  !$omp teams num_teams (7)
15  !$omp end teams
16end
17
18subroutine bar
19  !$omp target teams num_teams (5 : 19)
20  !$omp end target teams
21
22  !$omp target teams num_teams (21)
23  !$omp end target teams
24end
25
26subroutine baz
27  !$omp teams num_teams (fn (1) : fn (2))
28  !$omp end teams
29
30  !$omp teams num_teams (fn (3))
31  !$omp end teams
32end
33
34subroutine qux
35  !$omp target teams num_teams (fn (4) : fn (5))
36  !$omp end target teams
37
38  !$omp target teams num_teams (fn (6))
39  !$omp end target teams
40end
41
42subroutine corge
43  !$omp target
44    !$omp teams num_teams (fn (7) : fn (8))
45    !$omp end teams
46  !$omp end target
47
48  !$omp target
49    !$omp teams num_teams (fn (9))
50    !$omp end teams
51  !$omp end target
52end
53end module m
54