[LoopReroll] Add an extra defensive check to avoid SCEV assertion.
[llvm-project.git] / flang / test / Semantics / nullify01.f90
blob3fdf5d4fead0a29662ce933959cf9c989dc33d6f
1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
2 ! REQUIRES: shell
3 ! Test that NULLIFY works
5 Module share
6 Real, Pointer :: rp
7 Procedure(Real), Pointer :: mprp
8 End Module share
10 Program nullifytest
11 Use share
13 INTEGER, PARAMETER :: maxvalue=1024
15 Type dt
16 Integer :: l = 3
17 End Type
18 Type t
19 Type(dt),Pointer :: p
20 End Type
22 Type(t),Allocatable :: x(:)
23 Type(t),Pointer :: y(:)
24 Type(t),Pointer :: z
26 Integer, Pointer :: pi
27 Procedure(Real), Pointer :: prp
29 Allocate(rp)
30 Nullify(rp)
32 Allocate(x(3))
33 Nullify(x(2)%p)
35 Nullify(y(2)%p)
37 Nullify(pi)
38 Nullify(prp)
39 Nullify(mprp)
41 Nullify(z%p)
43 End Program