[Bug fortran/85953] New: [6/7/8/9 Regression] ICE in fold_convert_loc, at fold-const.c:2370

gscfq@t-online.de gcc-bugzilla@gcc.gnu.org
Mon May 28 18:41:00 GMT 2018


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

            Bug ID: 85953
           Summary: [6/7/8/9 Regression] ICE in fold_convert_loc, at
                    fold-const.c:2370
           Product: gcc
           Version: 9.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 6 to 9, gfortran-5 works :


$ cat z1.f90
program p
   character(:), allocatable :: x(:)
   x = [character :: 'a', 'b']
   x = ([character :: x, 'c'])
   print *, x
end


$ gfortran-5 z1.f90
$ a.out
 abc


$ gfortran-9-20180527 -c z1.f90
z1.f90:4:0:

    x = ([character :: x, 'c'])

internal compiler error: Segmentation fault
0xba072f crash_signal
        ../../gcc/toplev.c:325
0x929b80 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        ../../gcc/fold-const.c:2370
0x7621b0 gfc_alloc_allocatable_for_assignment(gfc_loopinfo*, gfc_expr*,
gfc_expr*)
        ../../gcc/fortran/trans-array.c:9935
0x786fc5 gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:10329
0x74af47 trans_code
        ../../gcc/fortran/trans.c:1828
0x772269 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6507
0x701040 translate_all_program_units
        ../../gcc/fortran/parse.c:6121
0x701040 gfc_parse_file()
        ../../gcc/fortran/parse.c:6324
0x7480ef gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204


More information about the Gcc-bugs mailing list