public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* When will the next gcc come out
@ 2010-07-23  8:41 Huang Bambo
  2010-07-23  8:57 ` Andy Koppe
  2010-07-23 13:57 ` Dave Korn
  0 siblings, 2 replies; 5+ messages in thread
From: Huang Bambo @ 2010-07-23  8:41 UTC (permalink / raw)
  To: The Cygwin Mailing List

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.
So, maybe many people may waiting for the new version. :>
Thanks !

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When will the next gcc come out
  2010-07-23  8:41 When will the next gcc come out Huang Bambo
@ 2010-07-23  8:57 ` Andy Koppe
  2010-07-23 10:08   ` Huang Bambo
  2010-07-23 13:57 ` Dave Korn
  1 sibling, 1 reply; 5+ messages in thread
From: Andy Koppe @ 2010-07-23  8:57 UTC (permalink / raw)
  To: cygwin

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:

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When will the next gcc come out
  2010-07-23  8:57 ` Andy Koppe
@ 2010-07-23 10:08   ` Huang Bambo
  2010-07-23 14:00     ` Dave Korn
  0 siblings, 1 reply; 5+ messages in thread
From: Huang Bambo @ 2010-07-23 10:08 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When will the next gcc come out
  2010-07-23  8:41 When will the next gcc come out Huang Bambo
  2010-07-23  8:57 ` Andy Koppe
@ 2010-07-23 13:57 ` Dave Korn
  1 sibling, 0 replies; 5+ messages in thread
From: Dave Korn @ 2010-07-23 13:57 UTC (permalink / raw)
  To: cygwin

On 23/07/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.
> So, maybe many people may waiting for the new version. :>

  4.5.0-1 has completed building and testing, I need to finish up the
packaging (setup.hints and README/release announcement) and I'll upload it
overnight tonight.

  It will be a test release to start with, owing to regressions in Ada.  After
it's done, I'll be starting on getting 4.5.1-1 ready, hopefully with fixed Ada.

    cheers,
      DaveK


--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: When will the next gcc come out
  2010-07-23 10:08   ` Huang Bambo
@ 2010-07-23 14:00     ` Dave Korn
  0 siblings, 0 replies; 5+ messages in thread
From: Dave Korn @ 2010-07-23 14:00 UTC (permalink / raw)
  To: cygwin

On 23/07/2010 10:02, Huang Bambo wrote:

> 
> 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...

  You need to check in more detail than that.  GCC may have optimised away the
fp variable, but kept the functionality implied by the line.  You'd need to
study the assembly code to see if it really did what the C code said it should
do or not.

    cheers,
      DaveK

--
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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-23 13:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-23  8:41 When will the next gcc come out Huang Bambo
2010-07-23  8:57 ` Andy Koppe
2010-07-23 10:08   ` Huang Bambo
2010-07-23 14:00     ` Dave Korn
2010-07-23 13:57 ` Dave Korn

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).