https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83093
Bug ID: 83093 Summary: ICE in fold_convert_loc, at fold-const.c:2266 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- With invalid code, down to at least 4.8 : $ cat z1.f90 program p character(:), allocatable :: z allocate (character(a) :: z) end $ cat z2.f90 program p real :: a = 2 character(:), allocatable :: z allocate (character(a) :: z) end $ cat z3.f90 program p character(:), allocatable :: z allocate (character((1.0)) :: z) end $ gfortran-8-20171119 -c z1.f90 z1.f90:3:0: allocate (character(a) :: z) internal compiler error: in fold_convert_loc, at fold-const.c:2266 0x9060ff fold_convert_loc(unsigned int, tree_node*, tree_node*) ../../gcc/fold-const.c:2265 0x734581 gfc_allocate_allocatable(stmtblock_t*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, tree_node*, gfc_expr*, int) ../../gcc/fortran/trans.c:800 0x7a0dbd gfc_trans_allocate(gfc_code*) ../../gcc/fortran/trans-stmt.c:6220 0x732b07 trans_code ../../gcc/fortran/trans.c:1980 0x7598cc gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6437 0x6eb720 translate_all_program_units ../../gcc/fortran/parse.c:6091 0x6eb720 gfc_parse_file() ../../gcc/fortran/parse.c:6294 0x72ff5f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:204