ICE on invalid (gfortran 4.8): gfc_variable_attr(): Bad array reference

Andrew Benson abenson@obs.carnegiescience.edu
Thu Nov 1 22:43:00 GMT 2012


Hi Janus,

> > bug4.F90:14.13:
> > 
> > end module gn
> > 
> >              1
> > 
> > Internal Error at (1):
> > gfc_variable_attr(): Bad array reference
> > 
> > 
> > The code is invalid because the "name" function contains "implicit none"
> > but> 
> > the variable "i" used in:
> >     select type (component => self%cb(i))
> > 
> > is not explicitly defined. If I remove the "implicit none" or explicitly
> > define "i" the ICE goes away.
> > 
> > I couldn't find anything similar on bugzilla. If someone can confirm that
> > this is a new bug I'll open a PR.
> 
> yes, I can confirm it. Please open a PR.
> 
> Btw, with 4.7 I also see the ICE, but only after the correct error message:
> 
>     select type (component => self%cb(i))
>                                        1
> Error: Symbol 'i' at (1) has no IMPLICIT type
> 
> So, it might even qualify as a regression.

Thanks for confirming. This is now PR 55172.

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

Cheers,
Andrew.

-- 

* Andrew Benson: http://users.obs.carnegiescience.edu/abenson/contact.html

* Galacticus: http://sites.google.com/site/galacticusmodel



More information about the Fortran mailing list