From: Andrew Cagney <ac131313@redhat.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH RFC] Fix break.exp optimization related failure
Date: Sat, 27 Sep 2003 15:46:00 -0000 [thread overview]
Message-ID: <3F75AA04.8070603@redhat.com> (raw)
In-Reply-To: <1030927002610.ZM28054@localhost.localdomain>
> 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.
I've been told it gets eliminated because it's a "pure function" and the
caller realises that the return value isn't used. You want to see what
happens to store.c!
We [GDB] are going to have to get GCC to decide, from a developers [and
not compiler writers] point of view, exactly what is reasonable at -O1.
We're probably also going to have to split up our test files in to
separate .c's so that the compiler can't see smarts like this :-/
Andrew
next prev parent reply other threads:[~2003-09-27 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-27 0:26 Kevin Buettner
2003-09-27 0:31 ` David Carlton
2003-09-27 1:05 ` Kevin Buettner
2003-09-27 15:46 ` Andrew Cagney [this message]
2003-09-27 19:15 Michael Elizabeth Chastain
2003-09-27 19:30 ` Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3F75AA04.8070603@redhat.com \
--to=ac131313@redhat.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox