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/47546] [OOP] Internal error - free_pi_tree(): Unresolved fixup


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47546

--- Comment #19 from Rich Townsend <townsend at astro dot wisc.edu> 2011-03-16 02:29:35 UTC ---
(In reply to comment #18)
> (In reply to comment #8)
> > This is a *very* strange bug, to say the least. Here is a reduced test case:
> > 
> > 
> > module hydro_types
> >   implicit none
> > end module hydro_types
> > 
> > module hydro_state
> >   implicit none
> >   type :: state_t
> >      real    :: U         
> >      integer :: n
> >   end type
> >   private
> >   public :: state_t
> > contains
> >   subroutine init
> >     type(state_t) :: this
> >   end subroutine init
> > end module hydro_state
> > 
> > module hydro_speeds
> >   use hydro_state
> >   implicit none
> > contains
> >   subroutine speeds_cell (st, c_l, c_r)
> >     class(state_t) :: st
> >     real     :: c_l(st%n)
> >     real     :: c_r(st%n)
> >   end subroutine speeds_cell
> > end module hydro_speeds
> > 
> > module hydro_fluxes
> >   use hydro_state
> >   use hydro_speeds
> > end module
> 
> Here's an interesting observation: if the definitions of c_l and c_r are
> changed to
> 
>  real     :: c_l(:)
>  real     :: c_r(:)
> 
> (i.e., assumed shape rather than explicit shape), then the problem goes away.
> 
> In the interests of full disclosure, I should add that this is how I intended
> to code the speeds_cell routine in the first place -- I have no real need of
> the explicit shapes, assumed shapes are just fine. So, this bug becomes much
> less of a showstopper for me.

Well, I spoke too soon -- I've just gone through a code refactorization, and
this same bug has cropped up again. This time, the 'workaround' above no longer
helps out.

Fundamentally, this is a problem that hasn't gone away; the reduced test case
fails in exactly the same way, even using a recent (4.6.0 20110312) build. Has
anyone been able to figure out what is going on?


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