[NFC][RISCV] Remove CFIIndex argument from allocateStack (#117871)
[llvm-project.git] / flang / test / Semantics / definable04.f90
blobf9a5e045de1f0e9261400a06a22b13bc76bdfcaf
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 integer, target :: n
4 contains
5 function ptr()
6 integer, pointer :: ptr
7 ptr => n
8 end
9 subroutine s1(p)
10 integer, pointer, intent(in) :: p
11 end
12 subroutine s2(p)
13 integer, pointer, intent(in out) :: p
14 end
15 end
17 program test
18 use m
19 integer, pointer :: p
20 p => ptr() ! ok
21 ptr() = 1 ! ok
22 call s1(ptr()) ! ok
23 call s1(null()) ! ok
24 !ERROR: Actual argument associated with INTENT(IN OUT) dummy argument 'p=' is not definable
25 !BECAUSE: 'ptr()' is not a definable pointer
26 call s2(ptr())
27 end