https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88486
Bug ID: 88486 Summary: ICE in gfc_conv_scalarized_array_ref, at fortran/trans-array.c:3401 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- Affects versions down to at least gfortran-5. Under the hood related to pr85686. $ cat z1.f90 subroutine s(x) character(:), allocatable :: x(:) x = ['bcd'] x = ['a'//x//'e'] print *, x end $ gfortran-9-20181209 -c z1.f90 z1.f90:4:0: 4 | x = ['a'//x//'e'] | internal compiler error: Segmentation fault 0xb2f31f crash_signal ../../gcc/toplev.c:326 0x6caa5d gfc_conv_scalarized_array_ref ../../gcc/fortran/trans-array.c:3401 0x6cb82c gfc_conv_array_ref(gfc_se*, gfc_array_ref*, gfc_expr*, locus*) ../../gcc/fortran/trans-array.c:3554 0x6f468e gfc_conv_variable ../../gcc/fortran/trans-expr.c:2773 0x6f130a gfc_conv_expr(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-expr.c:8047 0x6f5039 gfc_conv_string_length(gfc_charlen*, gfc_expr*, stmtblock_t*) ../../gcc/fortran/trans-expr.c:2243 0x6c69f6 get_array_charlen ../../gcc/fortran/trans-array.c:6979 0x6c6b07 get_array_charlen ../../gcc/fortran/trans-array.c:6922 0x6c698e get_array_charlen ../../gcc/fortran/trans-array.c:6911 0x6d400c gfc_conv_expr_descriptor(gfc_se*, gfc_expr*) ../../gcc/fortran/trans-array.c:7296 0x6d480e get_array_ctor_all_strlen ../../gcc/fortran/trans-array.c:2025 0x6d4916 get_array_ctor_strlen(stmtblock_t*, splay_tree_s*, tree_node**) ../../gcc/fortran/trans-array.c:2142 0x6d25e7 trans_array_constructor ../../gcc/fortran/trans-array.c:2473 0x6d25e7 gfc_add_loop_ss_code ../../gcc/fortran/trans-array.c:2835 0x6d2e65 gfc_conv_loop_setup(gfc_loopinfo*, locus*) ../../gcc/fortran/trans-array.c:5129 0x6ff8db gfc_trans_assignment_1 ../../gcc/fortran/trans-expr.c:10208 0x6c278f trans_code ../../gcc/fortran/trans.c:1822 0x73084f gfc_trans_block_construct(gfc_code*) ../../gcc/fortran/trans-stmt.c:2066 0x6c2937 trans_code ../../gcc/fortran/trans.c:1918 0x6ea054 gfc_generate_function_code(gfc_namespace*) ../../gcc/fortran/trans-decl.c:6509