This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: optimization issue about -O2 and -Os


On Apr 29, 2004, at 9:05 PM, 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.

This is most likely, but it's also possible you have a source code bug that
happens to "work" (i.e. do what you intended) with -O2 but not -Os.
Regardless, debugging it is the right way to go.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]