[Bug fortran/56637] Bad result on max(1,shiftr(j,1))

fkrogh#gcc at mathalacarte dot com gcc-bugzilla@gcc.gnu.org
Sun Mar 17 16:40:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56637

--- Comment #13 from Fred Krogh <fkrogh#gcc at mathalacarte dot com> 2013-03-17 16:40:22 UTC ---
As perhaps you have already guessed, this is just me being confused.  After
removing a lot of stuff from the code, I inserted a print statement thus

 620     k = max(1, shiftr(l,1)) ! The increment during the sort
 621     do ! Sort constraints to make active (Shell sort)
 622       do i = k + 1, l
 623         print '("i=",i0)', i

The break point is at line 621.  The print occurs before the break point is
reached.  The print shows that all is o.k.  I was confused as I thought the
breakpoint would be hit before getting into the loop.  Interestingly the
breakpoint has the behavior I expected with "-O1" or "-O2".

I'm sorry to have bothered you folks with this, but I'm glad to know a little
about valgrind.



More information about the Gcc-bugs mailing list