1 ! RUN: %python %S/test_errors.py %s %flang_fc1 -pedantic
2 ! !DIR$ IGNORE_TKR tests
4 !ERROR: !DIR$ IGNORE_TKR directive must appear in a subroutine or function
9 !ERROR: !DIR$ IGNORE_TKR directive must appear in a subroutine or function
30 real, intent(in
) :: a(2)
35 real, intent(in
) :: m(2,2)
44 !ERROR: !DIR$ IGNORE_TKR directive may not have an empty parenthesized list of letters
56 !WARNING: !DIR$ IGNORE_TKR should not apply to an allocatable or pointer
57 real, intent(in
), allocatable
:: x
62 !WARNING: !DIR$ IGNORE_TKR should not apply to an allocatable or pointer
63 real, intent(in
), pointer :: x
68 !ERROR: !DIR$ IGNORE_TKR directive may apply only to a dummy data argument
74 !ERROR: 'p' is a data object and may not be EXTERNAL
76 !ERROR: 'q' is already declared as an object
78 procedure(), pointer :: r
79 !ERROR: 'r' must be an object
83 elemental
subroutine t13(x
)
85 !ERROR: !DIR$ IGNORE_TKR(R) may not apply in an ELEMENTAL procedure
91 !WARNING: !DIR$ IGNORE_TKR(R) should not apply to a dummy argument passed via descriptor
95 module subroutine t24(x
)
105 !ERROR: !DIR$ IGNORE_TKR may not apply to an allocatable or pointer
106 real, intent(in
), allocatable
:: x
111 !ERROR: !DIR$ IGNORE_TKR may not apply to an allocatable or pointer
112 real, intent(in
), pointer :: x
118 !ERROR: !DIR$ IGNORE_TKR directive must appear in the specification part
123 !ERROR: 'q' is not a valid letter for !DIR$ IGNORE_TKR directive
124 !dir$ ignore_tkr(q) x
133 !ERROR: 'x' must be local to this subprogram
141 !ERROR: 'x' must be local to this subprogram
147 !dir$ ignore_tkr(r) x
148 !WARNING: !DIR$ IGNORE_TKR(R) is not meaningful for an assumed-rank array
153 !dir$ ignore_tkr(r) x
154 !ERROR: !DIR$ IGNORE_TKR(R) may not apply to a dummy argument passed via descriptor
162 !ERROR: !DIR$ IGNORE_TKR may apply only in an interface or a module procedure
163 real, intent(in
) :: x
168 module subroutine t24(x
)
169 !dir$ ignore_tkr(t) x
176 !ERROR: !DIR$ IGNORE_TKR directive must appear in a subroutine or function
192 !ERROR: Actual argument type 'REAL(8)' is not compatible with dummy argument type 'REAL(4)'
198 !ERROR: Actual argument type 'INTEGER(4)' is not compatible with dummy argument type 'REAL(4)'
201 !ERROR: passing Hollerith or character literal as if it were BOZ
203 !ERROR: Actual argument type 'COMPLEX(4)' is not compatible with dummy argument type 'REAL(4)'
205 !ERROR: Actual argument type 'LOGICAL(4)' is not compatible with dummy argument type 'REAL(4)'
211 !WARNING: Actual argument array has fewer elements (2) than dummy argument 'm=' array (4)
231 !ERROR: !DIR$ IGNORE_TKR may apply only in an interface or a module procedure
232 real, intent(in
) :: x