A Bug of gfortran, g77 and g95 on default optimization

Steve Kargl sgk@troutmask.apl.washington.edu
Mon Jun 18 18:35:00 GMT 2007


On Mon, Jun 18, 2007 at 11:00:11AM -0700, Steve Kargl wrote:
> On Mon, Jun 18, 2007 at 06:54:52PM +0200, Tobias Burnus wrote:
> > Tobias Burnus wrote:
> > > Sunjoong Lee wrote:
> > >   
> > >> I had traced side effects of optimization levels for the legacy program;
> > >>    -O0 level and -O1 level were different
> > >>    but from -O1 to -O3 gave same (wrong) results on gfortran, g77 and
> > >> g95.
> > >>    I tested it with pgi fortran and got same (right) results.
> > >>     
> > 
> > Follow up: I can reproduce this on my Pentium M with FX's nightly build
> > (4.3.0) and SUSE's 4.2.1; I failed to reproduce the problem on x86-64
> > even using -m32 and according to Dominique it does not occur on PPC either.
> > 
> > The problem is tracked as
> > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32391
> > 
> 
> ftnchek reports a large number of potential problems with
> mixed mode math.

There appear to be additional problems with the code.

troutmask:sgk[231] gfc4x -o z -O -fbounds-check TMalign.f
troutmask:sgk[232] ./z 1aquA.pdb 1avaC.pdb | grep RMSD
At line 2122 of file TMalign.f
Fortran runtime error: Array reference out of bounds for array 'w', upper bound of dimension 1 exceeded

-- 
Steve



More information about the Fortran mailing list