https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82622
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #4 from kargl at gcc dot gnu.org --- (In reply to G. Steinmetz from comment #0) > This one is an interesting case ... > (... and the last PR derived from this search) > > > $ cat z1.f90 > program p > type t(a) > integer, len :: a > end type > type t2(b) > integer, len :: b > type(t(1)) :: r(b) > end type > type(t2(:)), allocatable :: x > allocate (t2(3) :: x) > end > > > $ gfortran-8-20171015 -c z1.f90 > z1.f90:10:0: > > allocate (t2(3) :: x) > > internal compiler error: Segmentation fault > 0xb5a08f crash_signal > ../../gcc/toplev.c:326 > 0x73cc83 structure_alloc_comps > ../../gcc/fortran/trans-array.c:8963 > 0x73ba67 structure_alloc_comps > ../../gcc/fortran/trans-array.c:8371 > 0x73df30 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int, > gfc_actual_arglist*) > ../../gcc/fortran/trans-array.c:9301 > 0x73c083 structure_alloc_comps > ../../gcc/fortran/trans-array.c:9099 > 0x73df30 gfc_allocate_pdt_comp(gfc_symbol*, tree_node*, int, > gfc_actual_arglist*) > ../../gcc/fortran/trans-array.c:9301 > 0x79b84a gfc_trans_allocate(gfc_code*) > ../../gcc/fortran/trans-stmt.c:6407 > 0x72d2f7 trans_code > ../../gcc/fortran/trans.c:1976 > 0x753f6c gfc_generate_function_code(gfc_namespace*) > ../../gcc/fortran/trans-decl.c:6420 > 0x6e6580 translate_all_program_units > ../../gcc/fortran/parse.c:6088 > 0x6e6580 gfc_parse_file() > ../../gcc/fortran/parse.c:6291 > 0x72a6bf gfc_be_parse_file > ../../gcc/fortran/f95-lang.c:204 My backtrace for this code starts with (gdb) bt #0 strcmp () at /usr/src/lib/libc/amd64/string/strcmp.S:48 #1 0x000000000078ec53 in structure_alloc_comps(gfc_symbol*, tree_node*, tree_node*, int, int, int) () at ../../gcc/gcc/fortran/trans-array.c:8963 #2 0x000000000078ea3a in structure_alloc_comps(gfc_symbol*, tree_node*, tree_node*, int, int, int) () at ../../gcc/gcc/fortran/trans-array.c:8371 #3 0x0000000000790481 in gfc_allocate_pdt_comp (der_type=<optimized out>, decl=<optimized out>, rank=<optimized out>, param_list=<optimized out>) at ../../gcc/gcc/fortran/trans-array.c:9300 #4 0x000000000078e602 in structure_alloc_comps(gfc_symbol*, tree_node*, tree_no which suggested that there is an invalid pointer to some string.