This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimization issue about -O2 and -Os
Thank you for your help, maybe I need to debug the applications with
gdb.
B.R
Ebony
On Fri, 2004-04-30 at 12:05, Jim Wilson wrote:
> 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.
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com