Files
clang-p2996/flang/test/Semantics/nullify01.f90
Michael Kruse 58c3f20bbf [flang][windows] Run regression tests under Windows. NFCI.
Allow the lit test suite to run under Windows. This encompasses the following changes:

 * Define `lit_tools_dir` for flang's test configuration
 * Replace `(<command> || true)` idiom with `not <command>`
 * Add `REQUIRES: shell` on tests that invoke a shell script

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D89368
2021-06-10 05:13:44 -05:00

44 lines
591 B
Fortran

! RUN: %S/test_errors.sh %s %t %flang_fc1
! REQUIRES: shell
! Test that NULLIFY works
Module share
Real, Pointer :: rp
Procedure(Real), Pointer :: mprp
End Module share
Program nullifytest
Use share
INTEGER, PARAMETER :: maxvalue=1024
Type dt
Integer :: l = 3
End Type
Type t
Type(dt),Pointer :: p
End Type
Type(t),Allocatable :: x(:)
Type(t),Pointer :: y(:)
Type(t),Pointer :: z
Integer, Pointer :: pi
Procedure(Real), Pointer :: prp
Allocate(rp)
Nullify(rp)
Allocate(x(3))
Nullify(x(2)%p)
Nullify(y(2)%p)
Nullify(pi)
Nullify(prp)
Nullify(mprp)
Nullify(z%p)
End Program