ICE on invalid with procedure interface
Andrew Benson
abenson@its.caltech.edu
Fri Oct 7 17:25:00 GMT 2011
On Friday, October 07, 2011, Janus Weil wrote:
> Hi Andrew,
>
> > The following causes an ICE using gfortran 4.7 r179642:
> I can confirm this ICE with 4.5, 4.6 and trunk. Could you please open
> a PR in bugzilla?
OK - it's reported as PR 50659:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50659
While filing the report, this bug was found as possibly related:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40591
Seems like it was a similar issue with a procedure not being recognized as
having an explicit interface. I'm not sure if it's relevant here.
> > The code is presumably invalid, because the "arrSize" variable (defined
> > in Size_Mod) isn't in scope where Proc1 is used as a procedure interface
>
> Do you have any compiler which manages to detect this?
No - all of the versions of gfotran that I have installed either give an ICE
or compile it without complaint. I think my old copy of the Intel compiler
doesn't recognize procedure pointers so that's no help.
> > Interestingly, 4.4.5 compiles without complaint, unless I remove "Proc1"
> > from the "public" statement in which case it instead complains "Error:
> > Interface 'proc1' of procedure 'proc_get' at (1) must be explicit". My
> > understanding is that Proc1 should have an explicit interface as it's in
> > a module, but perhaps this is only the case if it's visible from outside
> > the module?
>
> Spontaneously, I would tend to agree with you. So this may be yet
> another bug. Once the ICE is fixed, we should check if this also
> happens with more recent gfortran versions.
>
> What I find even more puzzling is that your program is even accepted
> by gfortran 4.3 (which IIRC does not support procedure pointers yet)
> ...
That is puzzling!
-Andrew.
--
* Andrew Benson: http://www.tapir.caltech.edu/~abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel
More information about the Fortran
mailing list