1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Tests valid and invalid usage of forward references to procedures
3 ! in specification expressions.
11 !ERROR: Automatic data object 'a' may not appear in the specification part of a module
13 !ERROR: No specific function of generic 'ifn2' matches the actual arguments
17 integer :: iarr(if1(n
))
19 pure
integer function if1(n
)
20 integer, intent(in
) :: n
24 integer :: iarr(ifn3(n
)) ! should resolve to if3
26 pure
integer function if2(n
)
27 integer, intent(in
) :: n
30 pure
integer function if3(n
)
31 integer, intent(in
) :: n
37 !ERROR: The internal function 'if1' may not be referenced in a specification expression
41 !ERROR: The internal function 'if2' may not be referenced in a specification expression
42 integer :: iarr(if2(n
))
44 pure
integer function if1(n
)
45 integer, intent(in
) :: n
48 pure
integer function if2(n
)
49 integer, intent(in
) :: n