This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
- From: "terry at chem dot gu dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 17:37:12 -0000
- Subject: [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
- References: <bug-31720-14178@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from terry at chem dot gu dot se 2007-05-04 18:37 -------
(In reply to comment #5)
> (In reply to comment #4)
> > (I guess I should qualify that. I don't have a copy of the standard laying
> > around to check, but it's legal according to the Ellis, Philips and Lahey
> > book.)
> >
>
> It is not valid code. The variable i is being used without it being set
> to some value, ie., i is undefined.
Well, obviously. Also obviously in the code in which I discovered the bug the
dimensioning variable was set.
Attached are revised codes that are 100% legal, give no warnings or errors with
either g95 or ifort, pass Lahey's online standards conformance test and still
produce the ICE with gfortran 4.2.
Interestingly, if i is defined in nnh.f90 before the call to f the ICE goes
away.
Thus, while it may not effect the WONTFIX, I'm changing the keyword to
ice-on-valid-code.
(OK, that's the end of my "I know Fortran!" rant! ;-)
--
terry at chem dot gu dot se changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720