1 ! RUN: %python %S/test_errors.py %s %flang_fc1
5 call a
! OK - can be function or subroutine
6 !ERROR: Cannot call subroutine 'a' like a function
8 !ERROR: Cannot call function 'b' like a subroutine
10 !ERROR: Cannot call function 'y' like a subroutine
13 !ERROR: Cannot call subroutine 'x' like a function
18 !ERROR: Cannot call function 'f' like a subroutine
20 !ERROR: Cannot call subroutine 's' like a function
21 !ERROR: Function result characteristics are not known
29 ! subroutine vs. function is determined by use
32 !ERROR: Cannot call subroutine 'a' like a function
35 !ERROR: Cannot call function 'b' like a subroutine
40 ! subroutine vs. function is determined by use, even in internal subprograms
49 !ERROR: Cannot call function 'a' like a subroutine
51 !ERROR: Cannot call subroutine 'b' like a function
57 ! subroutine vs. function is determined at end of specification part
63 !ERROR: Cannot call subroutine 'b' like a function
68 ! Call to entity in global scope, even with IMPORT, NONE
73 !ERROR: 'm' is not a callable procedure
75 !ERROR: 'm' is not a callable procedure
80 ! Call to entity in global scope, even with IMPORT, NONE
86 !ERROR: Cannot call function 'foo' like a subroutine
94 !ERROR: 'a6' was previously called as a subroutine
102 !ERROR: 'a7' was previously called as a function
106 !OK: use of a8 and b8 is consistent