This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/70950] New: ICE with -O0 in simplify_subreg, at simplify-rtx.c:5895
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 04 May 2016 15:10:56 +0000
- Subject: [Bug fortran/70950] New: ICE with -O0 in simplify_subreg, at simplify-rtx.c:5895
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70950
Bug ID: 70950
Summary: ICE with -O0 in simplify_subreg, at
simplify-rtx.c:5895
Product: gcc
Version: 6.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
This error message is generated with optimization level -O0 :
(affects older gfortran versions too)
$ cat z1.f90
program p
type t1
end type
type t2
type(t1), pointer :: q => null()
end type
type(t1), pointer :: a, b
type(t2) :: c
allocate(a)
call s(a, c)
print *, 'a', associated(a, f(c))
b => f(c)
print *, 'b', associated(a, b)
contains
subroutine s(x, y)
type(t1), pointer :: x
type(t2), intent(out) :: y
y%q => x
end
function f(x) result (z)
type(t2), intent(in) :: x
class(t1), pointer :: z
z => x%q
end
end
$ gfortran-6 -O0 z1.f90
z1.f90:12:0:
print *, 'a', associated(a, f(c))
internal compiler error: in simplify_subreg, at simplify-rtx.c:5895