From: Huang Bambo <bambo.huang@gmail.com>
To: cygwin@cygwin.com
Subject: Re: When will the next gcc come out
Date: Fri, 23 Jul 2010 10:08:00 -0000 [thread overview]
Message-ID: <AANLkTi=RzGekyTSKhYLjvsUF6bg4=Wq6c9oGiF+OGdAo@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimXs6dcQE8inCh9bNABKL0dgStEP_VFEiUqSOu9@mail.gmail.com>
2010/7/23 Andy Koppe <andy.koppe@gmail.com>:
> 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 <ace/Log_Msg.h>
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++ = *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_optimization
>
> Andy
>
> --
> 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
>
>
--
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
next prev parent reply other threads:[~2010-07-23 9:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-23 8:41 Huang Bambo
2010-07-23 8:57 ` Andy Koppe
2010-07-23 10:08 ` Huang Bambo [this message]
2010-07-23 14:00 ` Dave Korn
2010-07-23 13:57 ` Dave Korn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTi=RzGekyTSKhYLjvsUF6bg4=Wq6c9oGiF+OGdAo@mail.gmail.com' \
--to=bambo.huang@gmail.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).