public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39896] New: ICE with -fwhole-file
@ 2009-04-25 13:32 dfranke at gcc dot gnu dot org
2009-04-25 14:10 ` [Bug fortran/39896] " dominiq at lps dot ens dot fr
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-04-25 13:32 UTC (permalink / raw)
To: gcc-bugs
The code below (extracted from a large application) gives an ICE if compiled
with -fwhole-file.
$> cat ice.for
PROGRAM xxx
implicit Real*8 (a-h,o-z)
PARAMETER ( NU = 512*101 + 10*101 + 2*512 )
DIMENSION AJ(2048)
DIMENSION AIS(512), ER1(512)
DIMENSION U(NU), U2(NU)
CALL PTIC10(U,U2,ER1,NR0,N,AJ,AIS)
456 CONTINUE
GO TO 456
END
SUBROUTINE PTIC10(A,A1,ER,N,M,AJ,AIS)
implicit real*8 (a-h,o-z)
DIMENSION ER(M),A(M,N),A1(M,N),AJ(M),AIS(M)
END
$> gfortran-svn -c -fwhole-file ice.for
f951: internal compiler error: Segmentation fault
$> gfortran-svn -v
gcc version 4.5.0 20090424
--
Summary: ICE with -fwhole-file
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: dfranke at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
@ 2009-04-25 14:10 ` dominiq at lps dot ens dot fr
2009-04-25 17:02 ` dfranke at gcc dot gnu dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-25 14:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from dominiq at lps dot ens dot fr 2009-04-25 14:10 -------
Confirmed. You don't need the infinite loop to get the bus error, the following
block triggers it also:
456 CONTINUE
go to 500
GO TO 456
500 continue
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
2009-04-25 14:10 ` [Bug fortran/39896] " dominiq at lps dot ens dot fr
@ 2009-04-25 17:02 ` dfranke at gcc dot gnu dot org
2009-04-25 17:16 ` dfranke at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-04-25 17:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dfranke at gcc dot gnu dot org 2009-04-25 17:02 -------
It may be worth noting that there are no warnings in the application about
labels not being in the same block as the corresponding GOTO if compiled
without -fwhole-file, but if compiled with -fwhole-file some of these warnings
appear.
If these warnings are missed without -fwhole-file or spurious with
-fwhole-file, I can not say yet. I'll try to get a testcase ...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
2009-04-25 14:10 ` [Bug fortran/39896] " dominiq at lps dot ens dot fr
2009-04-25 17:02 ` dfranke at gcc dot gnu dot org
@ 2009-04-25 17:16 ` dfranke at gcc dot gnu dot org
2009-04-25 17:20 ` dominiq at lps dot ens dot fr
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-04-25 17:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from dfranke at gcc dot gnu dot org 2009-04-25 17:16 -------
Here's a testcase (doesn't "work" without the extra subroutine):
$> cat goto.for
i = 1
DO
CALL inc(i)
IF (i == 5) GOTO 100
END DO
100 PRINT *, "done"
END
SUBROUTINE inc(n)
INTEGER n
n = n + 1
END SUBROUTINE
$> gfortran-svn -Wall -W goto.for
[no warning]
$> gfortran-svn -Wall -W warning.for -fwhole-file
goto.for:6.3:
100 PRINT *, "done"
1
goto.for:4.72:
IF (i == 5) GOTO 100
2
Warning: Label at (1) is not in the same block as the GOTO statement at (2)
If this case is related to the ICE, I don't know, however, I observed both
together.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
` (2 preceding siblings ...)
2009-04-25 17:16 ` dfranke at gcc dot gnu dot org
@ 2009-04-25 17:20 ` dominiq at lps dot ens dot fr
2009-05-04 10:19 ` pault at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-25 17:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from dominiq at lps dot ens dot fr 2009-04-25 17:20 -------
This may also be related to some failures I have seen with the polyhedron
tests, see:
http://gcc.gnu.org/ml/fortran/2009-04/msg00031.html
I particular for
[ibook-dhum] lin/test% gfc -O1 -fwhole-file gas_dyn.f90
gas_dyn.f90: In function 'eos':
gas_dyn.f90:360: internal compiler error: Bus error <-- now 406
[ibook-dhum] lin/test% gfc -O2 -fwhole-file gas_dyn.f90
gas_dyn.f90: In function 'readin':
gas_dyn.f90:1572: internal compiler error: Bus error
[ibook-dhum] lin/test% gfc -O3 -fwhole-file gas_dyn.f90
gas_dyn.f90: In function 'nozzle':
gas_dyn.f90:896: internal compiler error: Bus error
where 1572 is a GOTO and 406 and 896 are IFs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
` (3 preceding siblings ...)
2009-04-25 17:20 ` dominiq at lps dot ens dot fr
@ 2009-05-04 10:19 ` pault at gcc dot gnu dot org
2009-05-04 10:31 ` pault at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-05-04 10:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pault at gcc dot gnu dot org 2009-05-04 10:19 -------
(In reply to comment #2)
> It may be worth noting that there are no warnings in the application about
> labels not being in the same block as the corresponding GOTO if compiled
> without -fwhole-file, but if compiled with -fwhole-file some of these warnings
> appear.
>
> If these warnings are missed without -fwhole-file or spurious with
> -fwhole-file, I can not say yet. I'll try to get a testcase ...
>
For some reason that I do not see right now, cs_base in resolve.c is not being
pushed or popped correctly.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
` (4 preceding siblings ...)
2009-05-04 10:19 ` pault at gcc dot gnu dot org
@ 2009-05-04 10:31 ` pault at gcc dot gnu dot org
2009-05-04 10:32 ` pault at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-05-04 10:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pault at gcc dot gnu dot org 2009-05-04 10:31 -------
> For some reason that I do not see right now, cs_base in resolve.c is not being
> pushed or popped correctly.
Ah yes! resolve_codes nulls out cs_base. The problem is fixed by storing
cs_base before calling gfc_resolve, at line 1674, and then restoring the value
afterwards. It might be cleaner to do this in gfc_resolve - I'll check later.
Paul
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
` (5 preceding siblings ...)
2009-05-04 10:31 ` pault at gcc dot gnu dot org
@ 2009-05-04 10:32 ` pault at gcc dot gnu dot org
2009-05-04 18:08 ` dfranke at gcc dot gnu dot org
2009-08-03 10:05 ` jv244 at cam dot ac dot uk
8 siblings, 0 replies; 10+ messages in thread
From: pault at gcc dot gnu dot org @ 2009-05-04 10:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2009-05-04 10:32 -------
I guess that I should take it :-)
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pault at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2009-05-04 10:32:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
` (6 preceding siblings ...)
2009-05-04 10:32 ` pault at gcc dot gnu dot org
@ 2009-05-04 18:08 ` dfranke at gcc dot gnu dot org
2009-08-03 10:05 ` jv244 at cam dot ac dot uk
8 siblings, 0 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-05-04 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from dfranke at gcc dot gnu dot org 2009-05-04 18:08 -------
Paul, your patch fixes all issues I came across when compiling my largish set
of fortran sources with -fwhole-file. So, now I "just" need to sort out all the
warnings that came up *cough* ;)
Many thanks!
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/fortra
| |n/2009-05/msg00046.html
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/39896] ICE with -fwhole-file
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
` (7 preceding siblings ...)
2009-05-04 18:08 ` dfranke at gcc dot gnu dot org
@ 2009-08-03 10:05 ` jv244 at cam dot ac dot uk
8 siblings, 0 replies; 10+ messages in thread
From: jv244 at cam dot ac dot uk @ 2009-08-03 10:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jv244 at cam dot ac dot uk 2009-08-03 10:05 -------
the testcases pass with current trunk. I'll close this as fixed.
--
jv244 at cam dot ac dot uk changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39896
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-08-03 10:05 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-25 13:32 [Bug fortran/39896] New: ICE with -fwhole-file dfranke at gcc dot gnu dot org
2009-04-25 14:10 ` [Bug fortran/39896] " dominiq at lps dot ens dot fr
2009-04-25 17:02 ` dfranke at gcc dot gnu dot org
2009-04-25 17:16 ` dfranke at gcc dot gnu dot org
2009-04-25 17:20 ` dominiq at lps dot ens dot fr
2009-05-04 10:19 ` pault at gcc dot gnu dot org
2009-05-04 10:31 ` pault at gcc dot gnu dot org
2009-05-04 10:32 ` pault at gcc dot gnu dot org
2009-05-04 18:08 ` dfranke at gcc dot gnu dot org
2009-08-03 10:05 ` jv244 at cam dot ac dot uk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).