[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / call20.f90
blob91ce2bfccc7f60143f7bb0442575be37af5a3d38
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
3 ! Test that the interface of specific intrinsics passed as dummy arguments
4 ! are correctly validated against actual arguments explicit interface.
6 intrinsic :: abs, dabs
7 interface
8 subroutine foo(f)
9 interface
10 function f(x)
11 real :: f
12 real, intent(in) :: x
13 end function
14 end interface
15 end subroutine
17 subroutine foo2(f)
18 interface
19 function f(x)
20 double precision :: f
21 double precision, intent(in) :: x
22 end function
23 end interface
24 end subroutine
25 end interface
27 ! OK
28 call foo(abs)
30 ! OK
31 call foo2(dabs)
33 !ERROR: Actual procedure argument has interface incompatible with dummy argument 'f='
34 call foo(dabs)
36 !ERROR: Actual procedure argument has interface incompatible with dummy argument 'f='
37 call foo2(abs)
38 end