1! PR middle-end/102972 2 3module m 4implicit none (type, external) 5 6! Note: Those are module functions - not an interface 7! Hence, they are internally manged to contain the module name! 8 9contains 10 11subroutine omp_set_num_teams (num_teams); integer :: num_teams; end 12subroutine omp_set_teams_thread_limit (thread_limit); integer :: thread_limit; end 13subroutine omp_set_num_teams_8 (num_teams); integer(8) :: num_teams; end 14subroutine omp_set_num_teams_9 (num_teams); integer :: num_teams; end 15subroutine omp_set_teams_thread_limit_8 (thread_limit); integer(8) :: thread_limit; end 16integer function omp_get_num_teams (); omp_get_num_teams = 0; end 17integer function omp_get_team_size (level); integer :: level; omp_get_team_size = 0; end 18integer function omp_get_team_num (); omp_get_team_num = 0; end 19integer function omp_get_max_teams (); omp_get_max_teams = 0; end 20integer function omp_get_teams_thread_limit (); omp_get_teams_thread_limit = 0; end 21logical function omp_is_initial_device (); omp_is_initial_device = .true.; end 22integer function omp_get_num_threads (); omp_get_num_threads = 0; end 23end module 24 25subroutine nest_test () 26 use m 27 implicit none (type, external) 28 29 integer :: i, n 30 !$omp teams 31 !$omp distribute parallel do simd 32 do i = 1, 64 33 end do 34 35 n = 0 36 n = n + omp_get_team_size (0) 37 n = n + omp_get_num_teams () 38 n = n + omp_get_team_num () 39 call omp_set_num_teams (n) 40 call omp_set_num_teams_8 (4_8) 41 call omp_set_num_teams_9 (4) 42 n = n + omp_get_max_teams () 43 n = n + omp_get_teams_thread_limit () 44 call omp_set_teams_thread_limit (n) 45 call omp_set_teams_thread_limit_8 (3_8) 46 !$omp end teams 47end 48