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

            Bug ID: 88206
           Summary: [7/8/9 Regression] ICE in gfc_match_type_spec, at
                    fortran/match.c:2229
           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 7,8,9 :


$ cat z1.f90
program p
   integer, parameter :: z(4) = [1,2,3,4]
   integer :: k = 2
   print *, [real(z(k))]
end


$ gfortran-6 -c z1.f90
$
$ gfortran-9-20181125 -c z1.f90
f951: internal compiler error: Segmentation fault
0xb2bcff crash_signal
        ../../gcc/toplev.c:326
0x64ba3f gfc_match_type_spec(gfc_typespec*)
        ../../gcc/fortran/match.c:2229
0x5ed6b0 gfc_match_array_constructor(gfc_expr**)
        ../../gcc/fortran/array.c:1151
0x650f29 match_primary
        ../../gcc/fortran/matchexp.c:153
0x650f29 match_level_1
        ../../gcc/fortran/matchexp.c:211
0x650f29 match_mult_operand
        ../../gcc/fortran/matchexp.c:267
0x651188 match_add_operand
        ../../gcc/fortran/matchexp.c:356
0x6513dc match_level_2
        ../../gcc/fortran/matchexp.c:480
0x651532 match_level_3
        ../../gcc/fortran/matchexp.c:551
0x651624 match_level_4
        ../../gcc/fortran/matchexp.c:599
0x651624 match_and_operand
        ../../gcc/fortran/matchexp.c:693
0x651812 match_or_operand
        ../../gcc/fortran/matchexp.c:722
0x6518e2 match_equiv_operand
        ../../gcc/fortran/matchexp.c:765
0x6519b4 match_level_5
        ../../gcc/fortran/matchexp.c:811
0x650d91 gfc_match_expr(gfc_expr**)
        ../../gcc/fortran/matchexp.c:870
0x6398d3 match_io_element
        ../../gcc/fortran/io.c:3587
0x63c245 match_io_list
        ../../gcc/fortran/io.c:3626
0x63c654 match_io
        ../../gcc/fortran/io.c:4287
0x63fe5a gfc_match_print()
        ../../gcc/fortran/io.c:4344
0x66b341 match_word
        ../../gcc/fortran/parse.c:65

Reply via email to