This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/65024] [4.9/5 Regression] [OOP] ICE concerning unlimited polymorphic pointer


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]