module m1 implicit none type :: t real :: r contains procedure :: p => s end type t contains subroutine s(v) class(t), intent(in) :: v print *, v % r end subroutine s end module m1
module m2 use m1 implicit none contains subroutine ss() type(t) :: v v % r = 2. ! comment the next line and it will compile call v % p() end subroutine ss end module m2 ! comment the next 2 lines and it will compile program pr end program pr > /space/rguenther/install/gcc-4.5.1/bin/gfortran -S t.f90 t.f90:25:0: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. with -fwhole-file it works, with -fno-whole-file it doesn't fail on the trunk. -- Summary: internal compiler error: Segmentation fault Product: gcc Version: 4.5.1 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45395