1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 ! Tests for circularly defined procedures
4 !ERROR: Procedure 'sub' is recursively defined. Procedures in the cycle: 'sub', 'p2'
12 !ERROR: Procedure 'p' is recursively defined. Procedures in the cycle: 'p', 'sub', 'p2'
21 end subroutine circular
23 !ERROR: Procedure 'foo' is recursively defined. Procedures in the cycle: 'foo', 'r'
24 function foo() result(r
)
25 !ERROR: Procedure 'r' is recursively defined. Procedures in the cycle: 'foo', 'r'
26 procedure(foo
), pointer :: r
30 !ERROR: Procedure 'p' is recursively defined. Procedures in the cycle: 'p', 'sub', 'p2'
33 !ERROR: Procedure 'sub' is recursively defined. Procedures in the cycle: 'p', 'sub', 'p2'
48 !ERROR: Procedure 'sub1' is recursively defined. Procedures in the cycle: 'p', 'sub1', 'arg'
50 procedure(sub1
) :: arg
64 !ERROR: Procedure 'sub1' is recursively defined. Procedures in the cycle: 'p', 'sub1', 'arg', 'sub', 'p2'
75 !ERROR: The interface for procedure 'p1' is recursively defined
76 !ERROR: The interface for procedure 'p2' is recursively defined
84 !ERROR: The interface for procedure 'p1' is recursively defined
85 !ERROR: The interface for procedure 'p2' is recursively defined
87 !ERROR: The interface for procedure 'p3' is recursively defined
95 module mutualSpecExprs
97 pure
integer function f(n
)
98 integer, intent(in
) :: n
102 pure
integer function g(n
)
103 integer, intent(in
) :: n
104 !ERROR: Procedure 'f' is referenced before being sufficiently defined in a context where it must be so