This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/69566] Failure of SELECT TYPE with unlimited polymorphic function result
- From: "pault at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 30 Jan 2016 18:34:44 +0000
- Subject: [Bug fortran/69566] Failure of SELECT TYPE with unlimited polymorphic function result
- Auto-submitted: auto-generated
- References: <bug-69566-4 at http dot gcc dot gnu dot org/bugzilla/>
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