This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [PATCH] Outwit compiler dead code elimination in break.exp test
- From: Fred Fish <fnf at public dot ninemoons dot com>
- To: cagney at gnu dot org (Andrew Cagney)
- Cc: fnf at ninemoons dot com, gdb-patches at sources dot redhat dot com
- Date: Mon, 1 Dec 2003 11:09:35 -0700 (MST)
- Subject: Re: [PATCH] Outwit compiler dead code elimination in break.exp test
- Reply-to: fnf at public dot ninemoons dot com (Fred Fish)
> 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
> As for stopping GCC from eliminating code - last time this came up (ref
> store.exp) it was recommended that the .c files be split so that GCC
> couldn't see the potential optimization.
If that is the prefered solution, I can rework the patch.
-Fred