This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30654] Segmentation fault -O2 of file with deep nested loops
- From: "dominiq at lps dot ens dot fr" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Jan 2007 14:36:05 -0000
- Subject: [Bug fortran/30654] Segmentation fault -O2 of file with deep nested loops
- References: <bug-30654-14027@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dominiq at lps dot ens dot fr 2007-01-31 14:36 -------
The variable 'ii1' does not seem initialized before line 34 where it is used.
On my tests with the original code I got the output:
144454401.000000000 without optimization. With optimization, gfortran 4.3.0
20070126 gives
1.00000000000000, xlf 1454401.00000000000, and g95 a segmentation fault.
If I add a line:
ii1=1.
before
jj1=1.
all the compilers give 14401.* with or without optimization.
This was detected with -fbounds-check, it could also have been detected with
"implicit none"
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30654