https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93365
Bug ID: 93365 Summary: ICE in match_data_constant, at fortran/decl.c:426 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: --- Follow-up of pr87994, changed between 20181028 and 20181104. While z0 works, cases with a zero-sized array will not : $ cat z0.f90 program p complex, parameter :: a(1) = 0 integer :: b data b /a%kind/ print *, b end $ gfortran-10-20200119 z0.f90 && ./a.out 4 $ cat z1.f90 program p complex, parameter :: a(0) = 0 integer :: b data b /a%kind/ end $ cat z2.f90 program p character, parameter :: a(0) = '0' integer :: b data b /a%kind/ end $ cat z3.f90 program p logical, parameter :: a(0) = .true. integer :: b data b /a%kind/ end $ cat z4.f90 program p real, parameter :: a(0) = 0 integer :: b data b /a%kind/ end $ gfortran-10-20200119 -c z1.f90 f951: internal compiler error: Segmentation fault 0xbaaaff crash_signal ../../gcc/toplev.c:328 0x631d74 match_data_constant ../../gcc/fortran/decl.c:426 0x631f23 top_val_list ../../gcc/fortran/decl.c:499 0x632232 gfc_match_data() ../../gcc/fortran/decl.c:712 0x69ae71 match_word ../../gcc/fortran/parse.c:65 0x69eece decode_statement ../../gcc/fortran/parse.c:469 0x69fc3a next_free ../../gcc/fortran/parse.c:1279 0x69fc3a next_statement ../../gcc/fortran/parse.c:1511 0x6a128b parse_spec ../../gcc/fortran/parse.c:3922 0x6a405c parse_progunit ../../gcc/fortran/parse.c:5848 0x6a5739 gfc_parse_file() ../../gcc/fortran/parse.c:6388 0x6f044f gfc_be_parse_file ../../gcc/fortran/f95-lang.c:210