https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71203
Bug ID: 71203
Summary: ICE in add_init_expr_to_sym, at fortran/decl.c:1512
and :1564
Product: gcc
Version: 6.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
While exploring "source space" around pr68019 and pr68154,
another issue came into focus :
$ cat z1.f90
program p
character(3), parameter :: a(4) = ' '
character(*), parameter :: x(0) = a(2:1)
end
$ gfortran-6 z1.f90
f951: internal compiler error: in add_init_expr_to_sym, at fortran/decl.c:1512
$ cat z2.f90
program p
character(3), parameter :: a(4) = ' '
character(*), parameter :: x(*) = a(2:1)
end
$ gfortran-6 z2.f90
f951: internal compiler error: in add_init_expr_to_sym, at fortran/decl.c:1512
$ cat z3.f90
program p
character(*), parameter :: a(4) = ' '
character(*), parameter :: x(*) = a(1:2)(3:1)
end
$ gfortran-6 z3.f90
*** Error in `/usr/lib64/gcc/x86_64-suse-linux/6/f951': malloc(): memory
corruption: 0x00000000032ff390 ***