This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/68226] ICE on wrong assignment of function pointer to allocatable
- 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: Thu, 05 Nov 2015 20:55:16 +0000
- Subject: [Bug fortran/68226] ICE on wrong assignment of function pointer to allocatable
- Auto-submitted: auto-generated
- References: <bug-68226-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68226
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
As a note, a correct code compiles and works :
$ cat z1ok.f90
program p
type t
integer :: n
end type
type(t), pointer :: a(:)
a => f()
print *, a
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 z1ok.f90
$ a.out
1 2