Seek debugging tip for crash at nullify call

Tobias Burnus burnus@net-b.de
Sat Oct 7 15:29:00 GMT 2006


Hi,

FX Coudert wrote:
>> does someone has an idea how to debug the following program?
I forgot to reply myself. I found the problem, The problem is the following
(http://gcc.gnu.org/PR29371):

The following program coredumps at nullify() when compiled with
-fbounds-check,
otherwise it does work as supposed. If I remove one of the nullify()s or
remove
the loop, it works ok.

---------------------------------------------
program test
implicit none
type projector_t
real, pointer :: ket(:, :), bra(:, :)
end type projector_t

type(projector_t),pointer, dimension(:) :: p
integer :: stat,i
allocate(p(2),stat=stat)
print *, 'state = ',stat
do i = 1, 2
nullify(p(i)%bra)
nullify(p(i)%ket)
end do
end program
---------------------------------------------

Tobias



More information about the Fortran mailing list