• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1! RUN: %S/test_errors.sh %s %t %f18
2! Test that NULLIFY works
3
4Module share
5  Real, Pointer :: rp
6  Procedure(Real), Pointer :: mprp
7End Module share
8
9Program nullifytest
10Use share
11
12INTEGER, PARAMETER :: maxvalue=1024
13
14Type dt
15  Integer :: l = 3
16End Type
17Type t
18  Type(dt),Pointer :: p
19End Type
20
21Type(t),Allocatable :: x(:)
22Type(t),Pointer :: y(:)
23Type(t),Pointer :: z
24
25Integer, Pointer :: pi
26Procedure(Real), Pointer :: prp
27
28Allocate(rp)
29Nullify(rp)
30
31Allocate(x(3))
32Nullify(x(2)%p)
33
34Nullify(y(2)%p)
35
36Nullify(pi)
37Nullify(prp)
38Nullify(mprp)
39
40Nullify(z%p)
41
42End Program
43