------- Comment #2 from dfranke at gcc dot gnu dot org 2008-01-24 19:44 ------- Simplified testcase:
$> cat pr34202.f90 program bug4a implicit none type bug4 ! Intentionally left empty end type bug4 type compound type(bug4) b end type compound type(bug4), parameter :: f = bug4() type(compound), parameter :: g = compound(bug4()) end program bug4a $> valgrind [...]f951 pr34202.f90 [...] ==8693== Invalid read of size 4 ==8693== at 0x805A5AD: formalize_init_expr (data.c:691) ==8693== by 0x4600BC7: ??? ==8693== Address 0x20 is not stack'd, malloc'd or (recently) free'd f951: internal compiler error: Segmentation fault Please submit a full bug report, Backtrace: Program received signal SIGSEGV, Segmentation fault. formalize_init_expr (expr=0x89b0b48) at ../../../gcc/gcc/fortran/data.c:691 691 if (c->n.component == NULL) (gdb) bt #0 formalize_init_expr (expr=0x89b0b48) at ../../../gcc/gcc/fortran/data.c:691 #1 0x080b85bd in traverse_ns (st=0x898dab8, func=0x805a690 <gfc_formalize_init_value>) at ../../../gcc/gcc/fortran/symbol.c:2951 #2 0x080a790f in resolve_types (ns=0x89afd68) at ../../../gcc/gcc/fortran/resolve.c:9010 #3 0x080ab63c in gfc_resolve (ns=0x89afd68) at ../../../gcc/gcc/fortran/resolve.c:9062 #4 0x0809c4c8 in gfc_parse_file () at ../../../gcc/gcc/fortran/parse.c:3554 #5 0x080c5815 in gfc_be_parse_file (set_yydebug=0) at ../../../gcc/gcc/fortran/f95-lang.c:260 #6 0x08367f34 in toplev_main (argc=2, argv=0xbf94fef4) at ../../../gcc/gcc/toplev.c:1042 #7 0x08111c4f in main (argc=0, argv=0x0) at ../../../gcc/gcc/main.c:35 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34202