[WebAssembly] Fix asan issue from https://reviews.llvm.org/D121349
[llvm-project.git] / flang / test / Semantics / call24.f90
blob9013a3f621b266e7a160bf314bfbc63fc9138d27
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! 15.4.2.2. Test that errors are reported when an explicit interface
3 ! is not provided for an external procedure that requires an explicit
4 ! interface (the definition needs to be visible so that the compiler
5 ! can detect the violation).
7 subroutine foo(a_pointer)
8 real, pointer :: a_pointer(:)
9 end subroutine
11 subroutine test()
12 real, pointer :: a_pointer(:)
13 real, pointer :: an_array(:)
15 ! This call would be allowed if the interface was explicit here,
16 ! but its handling with an implicit interface is different (no
17 ! descriptor involved, copy-in/copy-out...)
19 !ERROR: References to the procedure 'foo' require an explicit interface
20 call foo(a_pointer)
22 ! This call would be error if the interface was explicit here.
24 !ERROR: References to the procedure 'foo' require an explicit interface
25 call foo(an_array)
26 end subroutine