[Bug fortran/69566] Failure of SELECT TYPE with unlimited polymorphic function result
pault at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Jan 30 18:34:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69566
Paul Thomas <pault at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |pault at gcc dot gnu.org
Summary|[6 Regression] ICE with |Failure of SELECT TYPE with
|unlimited polymorphic array |unlimited polymorphic
|pointer function |function result
--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
The bug that is uncovered by the above fix is:
print *, associated(return_pointer()) ! ICE
contains
function return_pointer()
class(*), pointer :: return_pointer(:)
allocate (return_pointer, source = [1.0,2.0])
select type (return_pointer)
type is (real(4))
print *, return_pointer
end select
end function
end
./pr69566/pr69566.f90:7:23:
type is (real(4))
1
Error: Associate-name ‘__tmp_REAL_4’ at (1) is used as array
This does not occur if the function has an explicit result.
I have seen this one before :-(
Paul
More information about the Gcc-bugs
mailing list