[Bug fortran/68226] New: ICE on wrong assignment of function pointer to allocatable
gerhard.steinmetz.fortran@t-online.de
gcc-bugzilla@gcc.gnu.org
Thu Nov 5 20:54:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68226
Bug ID: 68226
Summary: ICE on wrong assignment of function pointer to
allocatable
Product: gcc
Version: 5.2.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 wrong code :
$ cat z1.f90
program p
type t
integer :: n
end type
type(t), allocatable :: a(:)
a = f()
contains
function f() result(r)
class(t), pointer :: r(:)
type(t), target :: b(2) = [t(1), t(2)]
r => b
end
end
$ gfortran -g -O0 -Wall -fcheck=all z1.f90
z1.f90:6:7:
a = f()
1
Warning: POINTER-valued function appears on right-hand side of assignment at
(1) [-Wsurprising]
z1.f90:6:0:
a = f()
1
internal compiler error: in gfc_trans_arrayfunc_assign, at
fortran/trans-expr.c:8315
More information about the Gcc-bugs
mailing list