This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
- 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: Mon, 16 Feb 2015 18:53:12 +0000
- Subject: [Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer
- Auto-submitted: auto-generated
- References: <bug-65024-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65024
--- Comment #10 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to homgran from comment #9)
> (In reply to Dominique d'Humieres from comment #8)
> > > > AFAICT the ICE for the original test is as old as the first implementation
> > > > of unlimited polymorphism.
> > >
> > > In that case, should we remove the '[4.9/5 Regression]' tag from the summary title?
> >
> > Please don't do that.
> >
I agree.
If the type 'T' is declared in the main programme the problem goes away. The
ICE occurs in the course of nullifying the vptr field. It appears that this
latter has no backend_decl; hence the ICE. I think that this implies that
something is going wrong with building the structure for the class component
but I haven't yet found why being use associated makes a difference.
This works fine:
MODULE X
TYPE T
CLASS(*), pointer :: info
END TYPE
END MODULE
PROGRAM P
use x
class(T), target, allocatable :: tgt
CONTAINS
SUBROUTINE BUG
USE X
CLASS(T), pointer :: e
e=>tgt
END SUBROUTINE
SUBROUTINE NEXT
USE X
CLASS (T), pointer :: e
END SUBROUTINE
END
Cheers
Paul