From: "Dave Korn" <dk@artimi.com>
To: "'gcc_mailing_list'" <gcc@gcc.gnu.org>
Subject: RE: optimization issue about -O2 and -Os
Date: Fri, 30 Apr 2004 16:06:00 -0000 [thread overview]
Message-ID: <NUTMEGOVzpWDZ838zOi000000f0@NUTMEG.CAM.ARTIMI.COM> (raw)
In-Reply-To: <1083297951.1082.9.camel@leaf.tuliptree.org>
> -----Original Message-----
> From: gcc-owner On Behalf Of Jim Wilson
> Sent: 30 April 2004 05:06
> On Thu, 2004-04-29 at 19:34, Ebony Zhu wrote:
> > Have you ever been troubled in the same problem? Are you
> sure it's a gcc
> > bug, and not a mistake I probably made when building the cross tool?
> > (e.g. missed some important options when building gcc).
>
> If something compiled with -O2 works and something compiled with -Os
> does not work, then the logical conclusion is that the -Os option is
> buggy.
>
> However, it is possible that something went wrong with your build, if
> you are trying to do something complicated. Since you didn't say
> anything about how you built the toolchain, or what you built, I can't
> comment on this. I was just assuming that you had one toolchain, and
> the only thing that changed was the -O2/-Os option when using it.
>
> I deal with gcc bugs everyday, but I don't have any specific knowledge
> about -Os PPC gcc-3.3.2 bugs.
>
> You might try debugging the problem a bit to see what is
> wrong. Run the
> programs under gdb and see where they fail. Put a breakpoint
> in main to
> see if maybe they fail before main is reached. Etc.
Use -fverbose-asm in conjunction with --save-temps to get a list of the
optimisations in effect at the top of each assembler code file. Try it with
-Os and -O2, and note the differences between them. You may be able to
narrow it down to a specific -f flag by starting with -O2 and introducing
the changes between that and -Os one at a time.
cheers,
DaveK
--
Can't think of a witty .sigline today....
next prev parent reply other threads:[~2004-04-30 9:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-29 10:33 Ebony Zhu
2004-04-30 0:37 ` Jim Wilson
2004-04-30 6:39 ` Ebony Zhu
2004-04-30 9:20 ` Jim Wilson
2004-04-30 13:23 ` Ebony Zhu
2004-04-30 16:06 ` Dave Korn [this message]
2004-04-30 16:42 ` Zack Weinberg
2004-04-30 18:09 ` Dave Korn
2004-04-30 19:12 ` Zack Weinberg
2004-04-30 19:45 ` Dave Korn
2004-04-30 20:05 ` Phil Edwards
2004-04-30 20:09 ` David Edelsohn
2004-04-30 21:02 ` llewelly
2004-04-30 18:29 ` Dale Johannesen
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=NUTMEGOVzpWDZ838zOi000000f0@NUTMEG.CAM.ARTIMI.COM \
--to=dk@artimi.com \
--cc=gcc@gcc.gnu.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).