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

            Bug ID: 96101
           Summary: [9/10/11 Regression] ICE in fold_convert_loc, at
                    fold-const.c:2398
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Started with early r8 (before 20180525), r7 compiles it :


$ cat z1.f90
program p
   character(:), allocatable :: x
   x = 'abc'
   associate (y => ([x(:)]))
      print *, y
   end associate
end


$ gfortran-7 -c z1.f90
$
$ gfortran-11-20200705 -c z1.f90
z1.f90:5:0:

    5 |       print *, y
      |
internal compiler error: Segmentation fault
0xd6980f crash_signal
        ../../gcc/toplev.c:328
0x9d1760 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/tree.h:3416
0x9d1760 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2398
0x750120 gfc_trans_create_temp_array(stmtblock_t*, stmtblock_t*, gfc_ss*,
tree_node*, tree_node*, bool, bool, bool, locus*)
        ../../gcc/fortran/trans-array.c:1415
0x75d797 gfc_conv_loop_setup(gfc_loopinfo*, locus*)
        ../../gcc/fortran/trans-array.c:5246
0x75dae2 gfc_conv_expr_descriptor(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-array.c:7447
0x7de401 trans_associate_var
        ../../gcc/fortran/trans-stmt.c:1890
0x7e4af9 gfc_trans_block_construct(gfc_code*)
        ../../gcc/fortran/trans-stmt.c:2283
0x7463a7 trans_code
        ../../gcc/fortran/trans.c:1960
0x77d745 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6840
0x6f6026 translate_all_program_units
        ../../gcc/fortran/parse.c:6307
0x6f6026 gfc_parse_file()
        ../../gcc/fortran/parse.c:6546
0x74269f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

Reply via email to