I recently encountered the following FAIL in the FR-V work that I've
been doing:
FAIL: gdb.base/break.exp: run until breakpoint set at small function, optimized file
The reason for this failure is that gcc has optimized out the call
to marker4(). I've determined that this happens not only using -O2,
but with -O1 as well. Surprisingly, it even happens when using the
following set of switches:
-O1 -fno-defer-pop -fno-thread-jumps -fno-loop-optimize
-fno-crossjumping -fno-if-conversion -fno-if-conversion2
-fno-guess-branch-probability -fno-cprop-registers
-fno-omit-frame-pointer
The various -fno-* options *should* be disabling the set of options
enabled by -O1. Anyway, I've been told that this optimization is
a special case of GCSE and apparently there's no way to disable it
via a command line switch.