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 --------------------------------------------- -- Summary: Coredump when using -fbounds-check with pointer & nullify Product: gcc Version: unknown Status: UNCONFIRMED Severity: major Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: tobias dot burnus at physik dot fu-berlin dot de http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29371