xref: /llvm-project/flang/test/Semantics/call35.f90 (revision c7040509299542f8986448fa47abc0f3da75f661)
1! RUN: %python %S/test_errors.py %s %flang_fc1 -Werror
2subroutine s1
3  call ext(1, 2)
4  call myerror('abc')
5end
6
7subroutine s2
8  !WARNING: Reference to the procedure 'ext' has an implicit interface that is distinct from another reference: distinct numbers of dummy arguments
9  call ext(1.)
10  call myerror('abcd') ! don't warn about distinct lengths
11end
12
13subroutine s3
14  interface
15    !WARNING: The global subprogram 'ext' is not compatible with its local procedure declaration (incompatible procedure attributes: ImplicitInterface)
16    subroutine ext(n)
17      integer n
18    end
19  end interface
20  call ext(3)
21  !ERROR: Actual argument type 'REAL(4)' is not compatible with dummy argument type 'INTEGER(4)'
22  call ext(4.)
23end
24