[Bug fortran/104349] New: ICE in (tree_to_uhwi) gfc_conv_array_initializer, at fortran/trans-array.cc:6337

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Wed Feb 2 18:38:55 GMT 2022


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

            Bug ID: 104349
           Summary: ICE in (tree_to_uhwi) gfc_conv_array_initializer, at
                    fortran/trans-array.cc:6337
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :
(undefined value n)


$ cat z1.f90
module m
   character(n), parameter :: a(1) = 'a'
end


$ gfortran-12-20220130 -c z1.f90
f951: internal compiler error: in tree_to_uhwi, at tree.h:4677
0x7bca34 tree_to_uhwi(tree_node const*)
        ../../gcc/tree.h:4677
0x7bca34 gfc_conv_array_initializer(tree_node*, gfc_expr*)
        ../../gcc/fortran/trans-array.cc:6337
0x7ea120 gfc_conv_initializer(gfc_expr*, gfc_typespec*, tree_node*, bool, bool,
bool)
        ../../gcc/fortran/trans-expr.cc:8379
0x7cb64b gfc_get_symbol_decl(gfc_symbol*)
        ../../gcc/fortran/trans-decl.cc:1944
0x7ce468 gfc_create_module_variable
        ../../gcc/fortran/trans-decl.cc:5244
0x789ca2 do_traverse_symtree
        ../../gcc/fortran/symbol.cc:4174
0x7cec6b gfc_generate_module_vars(gfc_namespace*)
        ../../gcc/fortran/trans-decl.cc:5743
0x7a6544 gfc_generate_module_code(gfc_namespace*)
        ../../gcc/fortran/trans.cc:2309
0x751a9f translate_all_program_units
        ../../gcc/fortran/parse.cc:6638
0x751a9f gfc_parse_file()
        ../../gcc/fortran/parse.cc:6938
0x79eecf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216


More information about the Gcc-bugs mailing list