1! { dg-additional-options "-Wno-deprecated-declarations" } 2 3program teams1 4 use omp_lib 5!$omp teams thread_limit (2) 6 if (omp_in_parallel ()) stop 1 7 if (omp_get_level () .ne. 0) stop 2 8 if (omp_get_ancestor_thread_num (0) .ne. 0) stop 3 9 if (omp_get_ancestor_thread_num (1) .ne. -1) stop 4 10 call omp_set_dynamic (.false.) 11 call omp_set_nested (.true.) 12!$omp parallel num_threads (2) 13 if (.not. omp_in_parallel ()) stop 5 14 if (omp_get_level () .ne. 1) stop 6 15 if (omp_get_ancestor_thread_num (0) .ne. 0) stop 7 16 if (omp_get_ancestor_thread_num (1) & 17& .ne. omp_get_thread_num ()) stop 8 18 if (omp_get_ancestor_thread_num (2) .ne. -1) stop 9 19!$omp end parallel 20!$omp end teams 21end program 22