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
100 !ERROR: !DIR$ IGNORE_TKR may not apply to an allocatable or pointer
101 real, intent(in
), allocatable
:: x
106 !ERROR: !DIR$ IGNORE_TKR may not apply to an allocatable or pointer
107 real, intent(in
), pointer :: x
113 !ERROR: !DIR$ IGNORE_TKR directive must appear in the specification part
118 !ERROR: 'q' is not a valid letter for !DIR$ IGNORE_TKR directive
119 !dir$ ignore_tkr(q) x
128 !ERROR: 'x' must be local to this subprogram
136 !ERROR: 'x' must be local to this subprogram
142 !dir$ ignore_tkr(c) x
143 !ERROR: !DIR$ IGNORE_TKR(C) may apply only to an assumed-shape array
148 !dir$ ignore_tkr(r) x
149 !WARNING: !DIR$ IGNORE_TKR(R) is not meaningful for an assumed-rank array
154 !dir$ ignore_tkr(r) x
155 !ERROR: !DIR$ IGNORE_TKR(R) may not apply to a dummy argument passed via descriptor
163 !ERROR: !DIR$ IGNORE_TKR may apply only in an interface or a module procedure
164 real, intent(in
) :: x
169 !ERROR: !DIR$ IGNORE_TKR directive must appear in a subroutine or function
185 !ERROR: Actual argument type 'REAL(8)' is not compatible with dummy argument type 'REAL(4)'
191 !ERROR: Actual argument type 'INTEGER(4)' is not compatible with dummy argument type 'REAL(4)'
194 !ERROR: passing Hollerith or character literal as if it were BOZ
196 !ERROR: Actual argument type 'COMPLEX(4)' is not compatible with dummy argument type 'REAL(4)'
198 !ERROR: Actual argument type 'LOGICAL(4)' is not compatible with dummy argument type 'REAL(4)'
204 !WARNING: Actual argument array has fewer elements (2) than dummy argument 'm=' array (4)
224 !ERROR: !DIR$ IGNORE_TKR may apply only in an interface or a module procedure
225 real, intent(in
) :: x