[PATCH] Outwit compiler dead code elimination in break.exp test

Michael Snyder msnyder@redhat.com
Tue Dec 9 01:02:00 GMT 2003

Fred Fish wrote:
>>I know that GCC will now, when -O is specified, inline (and thence 
>>eliminate) pure functions.  However, I don't think that should occure 
>>when -O isn't specified.
> It doesn't.  The gdb specifically uses optimization for the test that
> is currently failing:
>   FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file

Ah.  And I was gonna say "GCC shouldn't do that without optimization 
turned on".  Never mind, I guess...

More information about the Gdb-patches mailing list