This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/30654] Segmentation fault -O2 of file with deep nested loops



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]