* [Bug fortran/31720] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
@ 2007-04-27 5:58 ` burnus at gcc dot gnu dot org
2007-05-04 15:49 ` [Bug fortran/31720] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu dot org @ 2007-04-27 5:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from burnus at gcc dot gnu dot org 2007-04-27 06:58 -------
Fails with the newest 4.2.0, works with current 4.3.0
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.1.2 4.2.0
Known to work| |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
2007-04-27 5:58 ` [Bug fortran/31720] " burnus at gcc dot gnu dot org
@ 2007-05-04 15:49 ` fxcoudert at gcc dot gnu dot org
2007-05-04 16:46 ` terry at chem dot gu dot se
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-05-04 15:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-05-04 16:49 -------
Also happens on i686-linux. It's a 4.1/4.2 regression, which means we could
theoretically try to fix it. I'm closing this as WONTFIX nonetheless due to the
small impact of the bug (it's triggered by invalid code) and the fact that we
have already much on our plates.
If someone wants to take care of it, of if you (Terry) want to provide a patch,
it will be welcome!
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
Status|UNCONFIRMED |RESOLVED
GCC host triplet|x86_64-unknown-linux-gnu |
Keywords| |ice-on-invalid-code
Known to fail|4.1.2 4.2.0 |4.1.0 4.1.2 4.2.0
Known to work|4.3.0 |4.3.0 4.0.4
Resolution| |WONTFIX
Summary|ICE for module function |[4.1/4.2 only] ICE for
|returning automatic array |module function returning
| |automatic array
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
2007-04-27 5:58 ` [Bug fortran/31720] " burnus at gcc dot gnu dot org
2007-05-04 15:49 ` [Bug fortran/31720] [4.1/4.2 only] " fxcoudert at gcc dot gnu dot org
@ 2007-05-04 16:46 ` terry at chem dot gu dot se
2007-05-04 16:50 ` terry at chem dot gu dot se
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: terry at chem dot gu dot se @ 2007-05-04 16:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from terry at chem dot gu dot se 2007-05-04 17:46 -------
While being a reasonably uncommon case, AFAICT it's a legal construct. That
is: not invalid code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
` (2 preceding siblings ...)
2007-05-04 16:46 ` terry at chem dot gu dot se
@ 2007-05-04 16:50 ` terry at chem dot gu dot se
2007-05-04 17:14 ` kargl at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: terry at chem dot gu dot se @ 2007-05-04 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from terry at chem dot gu dot se 2007-05-04 17:50 -------
(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.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
` (3 preceding siblings ...)
2007-05-04 16:50 ` terry at chem dot gu dot se
@ 2007-05-04 17:14 ` kargl at gcc dot gnu dot org
2007-05-04 17:35 ` terry at chem dot gu dot se
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-05-04 17:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from kargl at gcc dot gnu dot org 2007-05-04 18:14 -------
(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.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
` (4 preceding siblings ...)
2007-05-04 17:14 ` kargl at gcc dot gnu dot org
@ 2007-05-04 17:35 ` terry at chem dot gu dot se
2007-05-04 17:35 ` terry at chem dot gu dot se
2007-05-04 17:37 ` terry at chem dot gu dot se
7 siblings, 0 replies; 9+ messages in thread
From: terry at chem dot gu dot se @ 2007-05-04 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from terry at chem dot gu dot se 2007-05-04 18:35 -------
Created an attachment (id=13508)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13508&action=view)
Revised nnh.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
` (5 preceding siblings ...)
2007-05-04 17:35 ` terry at chem dot gu dot se
@ 2007-05-04 17:35 ` terry at chem dot gu dot se
2007-05-04 17:37 ` terry at chem dot gu dot se
7 siblings, 0 replies; 9+ messages in thread
From: terry at chem dot gu dot se @ 2007-05-04 17:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from terry at chem dot gu dot se 2007-05-04 18:35 -------
Created an attachment (id=13507)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13507&action=view)
Revised acmod.f90
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31720
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/31720] [4.1/4.2 only] ICE for module function returning automatic array
2007-04-26 22:26 [Bug fortran/31720] New: ICE for module function returning automatic array terry at chem dot gu dot se
` (6 preceding siblings ...)
2007-05-04 17:35 ` terry at chem dot gu dot se
@ 2007-05-04 17:37 ` terry at chem dot gu dot se
7 siblings, 0 replies; 9+ messages in thread
From: terry at chem dot gu dot se @ 2007-05-04 17:37 UTC (permalink / raw)
To: gcc-bugs
------- 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
^ permalink raw reply [flat|nested] 9+ messages in thread