From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17609 invoked by alias); 23 Jul 2010 09:02:48 -0000 Received: (qmail 17382 invoked by uid 22791); 23 Jul 2010 09:02:47 -0000 X-SWARE-Spam-Status: No, hits=-1.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-vw0-f43.google.com (HELO mail-vw0-f43.google.com) (209.85.212.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 23 Jul 2010 09:02:41 +0000 Received: by vws8 with SMTP id 8so1661853vws.2 for ; Fri, 23 Jul 2010 02:02:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.121.141 with SMTP id h13mr1485605vcr.155.1279875758885; Fri, 23 Jul 2010 02:02:38 -0700 (PDT) Received: by 10.220.186.204 with HTTP; Fri, 23 Jul 2010 02:02:38 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Jul 2010 10:08:00 -0000 Message-ID: Subject: Re: When will the next gcc come out From: Huang Bambo To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2010-07/txt/msg00494.txt.bz2 2010/7/23 Andy Koppe : > On 23 July 2010 09:24, Huang Bambo wrote: >> The current gcc( 4.3.4 ) has some bug with O3 option. it will >> optimized out some needed code in some case. >> I meet this bug when I compile ACE library. >> If I use O2 option, everything goes fine. > > Have you got any actual evidence for this being a bug in gcc rather > than in your program? It's quite common that subtle program bugs get > exposed differently by different optimisations. This might also be > relevant: It's a very simple test program: #include int ACE_TMAIN( int argc, ACE_TCHAR **argv ) { ACE_DEBUG(( LM_DEBUG, ACE_TEXT("%D\n") )); return 0; } Gcc optimized out some code like *fp++ =3D *format_string ++; When I gdb to that line and "print fp", gdb reported that fp is optized out= ... If I compile ACE library with -O2, everything become OK. I will check if this will happen in other platform when I have time. > http://en.wikipedia.org/wiki/Aliasing_(computing)#Conflicts_with_optimiza= tion > > Andy > > -- > Problem reports: =A0 =A0 =A0 http://cygwin.com/problems.html > FAQ: =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://cygwin.com/faq/ > Documentation: =A0 =A0 =A0 =A0 http://cygwin.com/docs.html > Unsubscribe info: =A0 =A0 =A0http://cygwin.com/ml/#unsubscribe-simple > > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple