!======================================================================= ! FILE: TEST27.F90 ! DATE: 21 July 2003 ! ! TEST: Check whether dangling pointers for allocatable are detected ! ! Author/contact: Arnaud Desitter !======================================================================= program TEST27 integer, allocatable, target :: p1(:) integer, pointer :: p2(:) allocate(p1(5)) p1 = 1 p2 => p1 call d1 p2 = 2 ! Error write(*,*) 'Error not detected: ', p2 contains subroutine d1 deallocate(p1) end subroutine d1 end program TEST27