https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92872
Bug ID: 92872 Summary: [10 Regression] ICE in build_fold_indirect_ref_loc, at fold-const.c:14842 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Changed between 20190929 and 20191006 : (with a legal z0 for reference) $ cat z0.f90 subroutine s(x) integer, allocatable, optional :: x(:) x = [1, 2, 3] end $ gfortran-10-20191208 -c z0.f90 $ cat z1.f90 subroutine s(x) bind(c) integer, allocatable, optional :: x(:) x = [1, 2, 3] end $ gfortran-10-20190929 -c z1.f90 $ $ gfortran-10-20191208 -c z1.f90 z1.f90:3:0: 3 | x = [1, 2, 3] | internal compiler error: Segmentation fault 0xd05dff crash_signal ../../gcc/toplev.c:328 0x9821e4 contains_struct_check(tree_node*, tree_node_structure_enum, char const*, int, char const*) ../../gcc/tree.h:3386 0x9821e4 build_fold_indirect_ref_loc(unsigned int, tree_node*) ../../gcc/fold-const.c:14842 0x715eef gfc_conv_scalarized_array_ref ../../gcc/fortran/trans-array.c:3511 0x716c54 gfc_conv_array_ref(gfc_se*, gfc_array_ref*, gfc_expr*, locus*) ../../gcc/fortran/trans-array.c:3641 0x75679e gfc_conv_variable ../../gcc/fortran/trans-expr.c:2808 0x7514ba gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8665 0x75d677 gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:10884 0x709ee7 trans_code ../../gcc/fortran/trans.c:1864 0x74107d gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6801 0x6bafe6 translate_all_program_units ../../gcc/fortran/parse.c:6302 0x6bafe6 gfc_parse_file() ../../gcc/fortran/parse.c:6541 0x705fcf gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210