https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63494
janus at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
Status|WAITING |NEW
CC| |janus at gcc dot gnu.org
Summary|internal compiler error: |ICE with
|Bus error, and out of |deferred-character-length
|memory allocating ... |component
--- Comment #2 from janus at gcc dot gnu.org ---
I get an ICE on the following reduced and slightly modified test case:
implicit none
type :: lrStringType
character(:), allocatable :: right
end type
type :: lrString
type(lrStringType), allocatable :: storage(:)
end type
contains
pure subroutine getRight(this)
type(lrString), intent(IN) :: this
character(:), allocatable :: text
text = this%storage(1)%right(2:)
end subroutine
end
$ gfortran-5.0 c0.f90
f951: internal compiler error: Speicherzugriffsfehler
0xa2e19f crash_signal
/home/jweil/gcc/gcc50/trunk/gcc/toplev.c:359
0x5f06a4 gfc_copy_ref(gfc_ref*)
/home/jweil/gcc/gcc50/trunk/gcc/fortran/expr.c:651
0x5f0368 gfc_copy_expr(gfc_expr*)
/home/jweil/gcc/gcc50/trunk/gcc/fortran/expr.c:395
0x646987 gfc_resolve_substring_charlen(gfc_expr*)
/home/jweil/gcc/gcc50/trunk/gcc/fortran/resolve.c:4530
0x64420d gfc_resolve_expr(gfc_expr*)
/home/jweil/gcc/gcc50/trunk/gcc/fortran/resolve.c:6203
0x64adb4 gfc_resolve_code(gfc_code*, gfc_namespace*)
/home/jweil/gcc/gcc50/trunk/gcc/fortran/resolve.c:10003
0x64d6fa resolve_codes
/home/jweil/gcc/gcc50/trunk/gcc/fortran/resolve.c:14908
0x64d607 resolve_codes
/home/jweil/gcc/gcc50/trunk/gcc/fortran/resolve.c:14894
0x64d7e2 gfc_resolve
/home/jweil/gcc/gcc50/trunk/gcc/fortran/resolve.c:14936
0x638e2a resolve_all_program_units
/home/jweil/gcc/gcc50/trunk/gcc/fortran/parse.c:4886
0x638e2a gfc_parse_file()
/home/jweil/gcc/gcc50/trunk/gcc/fortran/parse.c:5129
0x677f35 gfc_be_parse_file
/home/jweil/gcc/gcc50/trunk/gcc/fortran/f95-lang.c:222
When removing the PURE attribute, I get:
f951: out of memory allocating 30704883504 bytes after a total of 561152 bytes