[NFC][RISCV] Remove CFIIndex argument from allocateStack (#117871)
[llvm-project.git] / flang / test / Semantics / nullify01.f90
blob21ffa81fbbd27222f23d6e09ae63548b0eda2385
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Test that NULLIFY works
4 Module share
5 Real, Pointer :: rp
6 Procedure(Real), Pointer :: mprp
7 End Module share
9 Program nullifytest
10 Use share
12 INTEGER, PARAMETER :: maxvalue=1024
14 Type dt
15 Integer :: l = 3
16 End Type
17 Type t
18 Type(dt),Pointer :: p
19 End Type
21 Type(t),Allocatable :: x(:)
22 Type(t),Pointer :: y(:)
23 Type(t),Pointer :: z
25 Integer, Pointer :: pi
26 Procedure(Real), Pointer :: prp
28 Allocate(rp)
29 Nullify(rp)
31 Allocate(x(3))
32 Nullify(x(2)%p)
34 Nullify(y(2)%p)
36 Nullify(pi)
37 Nullify(prp)
38 Nullify(mprp)
40 Nullify(z%p)
42 End Program