137 lines · plain
1! RUN: %python %S/../test_errors.py %s %flang -fopenacc2 3subroutine sub1(a)4 real, dimension(10) :: a5end subroutine6 7subroutine sub2(a)8 !$acc routine(sub1) gang(dim:1)9 real, dimension(10) :: a10 call sub1(a)11end subroutine12 13subroutine sub3()14 !$acc routine bind(sub1)15end subroutine16 17subroutine sub4()18 !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive19 !$acc routine gang(num: 1)20end subroutine21 22subroutine sub5()23 !ERROR: Only the dim argument is allowed on the GANG clause on the ROUTINE directive24 !$acc routine gang(static: 1)25end subroutine26 27subroutine sub6()28 !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive29 !$acc routine gang gang30 31 !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive32 !$acc routine worker gang33 34 !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive35 !$acc routine vector gang36 37 !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive38 !$acc routine seq gang39 40 !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive41 !$acc routine worker worker42 43 !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive44 !$acc routine gang worker45 46 !ERROR: Clause WORKER is not allowed if clause VECTOR appears on the ROUTINE directive47 !$acc routine vector worker48 49 !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive50 !$acc routine seq worker51 52 !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive53 !$acc routine vector vector54 55 !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive56 !$acc routine gang vector57 58 !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive59 !$acc routine worker vector60 61 !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive62 !$acc routine seq vector63 64 !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive65 !$acc routine seq seq66 67 !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive68 !$acc routine gang seq69 70 !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive71 !$acc routine worker seq72 73 !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive74 !$acc routine vector seq75 76end subroutine77 78subroutine sub7()79 !$acc routine device_type(*) gang device_type(host) worker80 81 !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive82 !$acc routine device_type(*) gang seq83 84 !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive85 !$acc routine device_type(*) gang worker86 87 !ERROR: Clause GANG is not allowed if clause GANG appears on the ROUTINE directive88 !$acc routine gang device_type(*) gang89 90 !ERROR: Clause WORKER is not allowed if clause GANG appears on the ROUTINE directive91 !$acc routine gang device_type(*) worker92 93 !ERROR: Clause VECTOR is not allowed if clause GANG appears on the ROUTINE directive94 !$acc routine gang device_type(*) vector95 96 !ERROR: Clause SEQ is not allowed if clause GANG appears on the ROUTINE directive97 !$acc routine gang device_type(*) seq98 99 !ERROR: Clause WORKER is not allowed if clause WORKER appears on the ROUTINE directive100 !$acc routine worker device_type(*) worker101 102 !ERROR: Clause GANG is not allowed if clause WORKER appears on the ROUTINE directive103 !$acc routine worker device_type(*) gang104 105 !ERROR: Clause VECTOR is not allowed if clause WORKER appears on the ROUTINE directive106 !$acc routine worker device_type(*) vector107 108 !ERROR: Clause SEQ is not allowed if clause WORKER appears on the ROUTINE directive109 !$acc routine worker device_type(*) seq110 111 !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive112 !$acc routine vector device_type(*) vector113 114 !ERROR: Clause GANG is not allowed if clause VECTOR appears on the ROUTINE directive115 !$acc routine vector device_type(*) gang116 117 !ERROR: Clause VECTOR is not allowed if clause VECTOR appears on the ROUTINE directive118 !$acc routine vector device_type(*) vector119 120 !ERROR: Clause SEQ is not allowed if clause VECTOR appears on the ROUTINE directive121 !$acc routine vector device_type(*) seq122 123 !ERROR: Clause SEQ is not allowed if clause SEQ appears on the ROUTINE directive124 !$acc routine seq device_type(*) seq125 126 !ERROR: Clause GANG is not allowed if clause SEQ appears on the ROUTINE directive127 !$acc routine seq device_type(*) gang128 129 !ERROR: Clause VECTOR is not allowed if clause SEQ appears on the ROUTINE directive130 !$acc routine seq device_type(*) vector131 132 !ERROR: Clause WORKER is not allowed if clause SEQ appears on the ROUTINE directive133 !$acc routine seq device_type(*) worker134 135 !$acc routine device_type(host) seq device_type(nvidia) gang device_type(multicore) vector device_type(*) worker136end subroutine137