X-Recipient: archive-cygwin AT delorie DOT com 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 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 23 Jul 2010 17:02:38 +0800 Message-ID: Subject: Re: When will the next gcc come out From: Huang Bambo To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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