1! Test various aspects of clauses specifying compatible levels of parallelism 2! with the OpenACC routine directive. The C/C++ counterpart is 3! '../../c-c++-common/goacc/routine-level-of-parallelism-2.c'. 4 5! { dg-additional-options "-Wopenacc-parallelism" } for testing/documenting 6! aspects of that functionality. 7 8subroutine g_1 9 !$acc routine gang 10 ! { dg-warning "region is gang partitioned but does not contain gang partitioned code" "" { target *-*-* } .-2 } 11 ! { dg-warning "region is worker partitioned but does not contain worker partitioned code" "" { target *-*-* } .-3 } 12 ! { dg-warning "region is vector partitioned but does not contain vector partitioned code" "" { target *-*-* } .-4 } 13end subroutine g_1 14 15subroutine s_1_2a 16 !$acc routine 17end subroutine s_1_2a 18 19subroutine s_1_2b 20 !$acc routine seq 21end subroutine s_1_2b 22 23subroutine s_1_2c 24 !$acc routine (s_1_2c) 25end subroutine s_1_2c 26 27subroutine s_1_2d 28 !$acc routine (s_1_2d) seq 29end subroutine s_1_2d 30 31module s_2 32contains 33 subroutine s_2_1a 34 !$acc routine 35 end subroutine s_2_1a 36 37 subroutine s_2_1b 38 !$acc routine seq 39 end subroutine s_2_1b 40 41 subroutine s_2_1c 42 !$acc routine (s_2_1c) 43 end subroutine s_2_1c 44 45 subroutine s_2_1d 46 !$acc routine (s_2_1d) seq 47 end subroutine s_2_1d 48end module s_2 49 50subroutine test 51 external g_1, w_1, v_1 52 external s_1_1, s_1_2 53 54 interface 55 function s_3_1a (a) 56 integer a 57 !$acc routine 58 end function s_3_1a 59 end interface 60 61 interface 62 function s_3_1b (a) 63 integer a 64 !$acc routine seq 65 end function s_3_1b 66 end interface 67 68 !$acc routine(g_1) gang 69 70 !$acc routine(w_1) worker 71 72 !$acc routine(v_1) worker 73 74 ! Also test the implicit seq clause. 75 76 !$acc routine (s_1_1) seq 77 78end subroutine test 79