[Bug fortran/93832] [9/10/11/12 Regression] ICE in gfc_convert_to_structure_constructor, at fortran/primary.c:3100

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Mon Jan 24 20:38:50 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93832

--- Comment #8 from G. Steinmetz <gscfq@t-online.de> ---

With the latest gcc snapshot and configured with --enable-checking=yes 
the testcase from comment#0 still produces an ICE :


$ gfortran-12-20220123-chk -c z1.f90
z1.f90:7:28:

    7 |    type(t) :: z = t('a', 2, [3])
      |                            1
Error: Bad array spec of component 'c' referenced in structure constructor at
(1)
f951: internal compiler error: Segmentation fault
0xe6bd5f crash_signal
        ../../gcc/toplev.cc:322
0x796aa5 gfc_convert_to_structure_constructor(gfc_expr*, gfc_symbol*,
gfc_expr**, gfc_actual_arglist**, bool)
        ../../gcc/fortran/primary.cc:3204
0x7a0fca resolve_generic_f
        ../../gcc/fortran/resolve.cc:2801
0x7a0fca resolve_function
        ../../gcc/fortran/resolve.cc:3321
0x7a0fca gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7169
0x6f9164 resolve_array_bound
        ../../gcc/fortran/array.cc:378
0x6f9e46 gfc_resolve_array_spec(gfc_array_spec*, int)
        ../../gcc/fortran/array.cc:422
0x7afbca resolve_component
        ../../gcc/fortran/resolve.cc:14887
0x7b08e2 resolve_fl_derived0
        ../../gcc/fortran/resolve.cc:15006
0x7b0c2a resolve_fl_derived
        ../../gcc/fortran/resolve.cc:15135
0x7aa6f7 resolve_symbol
        ../../gcc/fortran/resolve.cc:15505
0x7c9922 do_traverse_symtree
        ../../gcc/fortran/symbol.cc:4174
0x7adca4 resolve_types
        ../../gcc/fortran/resolve.cc:17455
0x7a913c gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17570
0x791474 resolve_all_program_units
        ../../gcc/fortran/parse.cc:6586
0x791474 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6842
0x7df71f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216


More information about the Gcc-bugs mailing list