From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18485 invoked by alias); 30 Apr 2004 04:05:24 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 18449 invoked from network); 30 Apr 2004 04:05:23 -0000 Received: from unknown (HELO bluesmobile.specifixinc.com) (64.62.200.227) by sources.redhat.com with SMTP; 30 Apr 2004 04:05:23 -0000 Received: from localhost.localdomain (bluesmobile.corp.specifixinc.com [10.0.0.1]) by bluesmobile.specifixinc.com (Postfix) with ESMTP id C36C31650C; Thu, 29 Apr 2004 21:05:22 -0700 (PDT) Subject: Re: optimization issue about -O2 and -Os From: Jim Wilson To: Ebony Zhu Cc: gcc_mailing_list In-Reply-To: <1083292471.2834.5.camel@Woogie> References: <1083221404.1215.267.camel@Woogie> <40918894.6070706@specifixinc.com> <1083292471.2834.5.camel@Woogie> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Fri, 30 Apr 2004 09:20:00 -0000 Message-Id: <1083297951.1082.9.camel@leaf.tuliptree.org> Mime-Version: 1.0 X-SW-Source: 2004-04/txt/msg01433.txt.bz2 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