This module is taken from one of the Meissner tests and is the last to crash with gfortran:
! copyright 1996 Loren P. Meissner -- May be distributed if this line is included. ! Linked List operations with Pointer to Pointer module llo type :: it character*10 :: k integer :: c(2) end type it type :: bt type (nt), pointer :: p end type bt type :: nt type (it) :: i type (bt) :: b end type nt type (bt), pointer :: ptr end module llo produces [EMAIL PROTECTED] meissner]# /gcc-4.1/bin/gfortran -c meissner21_mod.f90 meissner21_mod.f90:0: internal compiler error: in gfc_get_derived_type, at fortran/trans-types.c:1459 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. A tentative fix is: Index: gcc/gcc/fortran/trans-types.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/fortran/trans-types.c,v retrieving revision 1.50 diff -c -p -r1.50 trans-types.c *** gcc/gcc/fortran/trans-types.c 29 Jul 2005 00:02:37 -0000 1.50 --- gcc/gcc/fortran/trans-types.c 27 Sep 2005 21:11:53 -0000 *************** gfc_get_derived_type (gfc_symbol * deriv *** 1456,1463 **** DECL_PACKED (field) |= TYPE_PACKED (typenode); ! gcc_assert (!c->backend_decl); ! c->backend_decl = field; } /* Now we have the final fieldlist. Record it, then lay out the --- 1456,1465 ---- DECL_PACKED (field) |= TYPE_PACKED (typenode); ! /* It can happen that in partially built, nested derived ! types that the component backend_decl already exists. */ ! if (!c->backend_decl) ! c->backend_decl = field; } /* Now we have the final fieldlist. Record it, then lay out the -- Summary: ICE in trans-types.c for nested derived types Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pault at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24092