ICE on invalid with procedure interface
Janus Weil
janus@gcc.gnu.org
Fri Oct 7 17:09:00 GMT 2011
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?
> 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?
> 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)
...
Cheers,
Janus
More information about the Fortran
mailing list