xref: /llvm-project/flang/test/Semantics/call21.f90 (revision 191d48723f8b853a6ad65532c173c67155cbe606)
1! RUN: %flang -fsyntax-only -pedantic 2>&1 %s | FileCheck %s
2! Verifies that warnings issue when actual arguments with implicit
3! interfaces are associated with dummy procedures and dummy procedure
4! pointers whose interfaces are explicit.
5module m
6 contains
7  real function realfunc(x)
8    real, intent(in) :: x
9    realfunc = x
10  end function
11  subroutine s00(p0)
12    procedure(realfunc) :: p0
13  end subroutine
14  subroutine s01(p1)
15    procedure(realfunc), pointer, intent(in) :: p1
16  end subroutine
17  subroutine s02(p2)
18    procedure(realfunc), pointer :: p2
19  end subroutine
20  subroutine test
21    external :: extfunc
22    external :: extfuncPtr
23    pointer :: extfuncPtr
24    !CHECK: Actual procedure argument has an implicit interface which is not known to be compatible with dummy argument 'p0=' which has an explicit interface
25    call s00(extfunc)
26    !CHECK: Actual procedure argument has an implicit interface which is not known to be compatible with dummy argument 'p1=' which has an explicit interface
27    call s01(extfunc)
28    !CHECK: Actual procedure argument has an implicit interface which is not known to be compatible with dummy argument 'p2=' which has an explicit interface
29    call s02(extfuncPtr)
30  end subroutine
31end module
32