public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/10482: Optimized and debug binaries of same application give different results.
@ 2003-04-24 16:06 Alberto.Ribon
  0 siblings, 0 replies; 2+ messages in thread
From: Alberto.Ribon @ 2003-04-24 16:06 UTC (permalink / raw)
  To: gcc-gnats


>Number:         10482
>Category:       optimization
>Synopsis:       Optimized and debug binaries of same application give different results.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 24 16:06:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Alberto.Ribon@cern.ch
>Release:        gcc 3.2.2 and earlier versions (2.95.2)
>Organization:
>Environment:
Linux Red Hat 7.3
>Description:
After building the same C++ application twice,
     once using debug  -g  option
 and once with optimization ( -O  option), 
and running them at the same conditions, the results 
numerically differ while they should be exactly the same.
We verified and are confident that there are no cases of
uninitialized variables or numerical instabilities (like
nan, division by zero, etc...).
We also verified that the same exercise on Sun Solaris
system with Forte CC 5.4 compiler (and earlier verions)
instead generates the same output in the two cases.

We would like to know if this is a known feature of gcc
compiler, and what could be the cause in terms of optimizations done with the default level -O.
>How-To-Repeat:
The problem appears in a rather complicated simulation 
application for which we don't have an easy test case to
provide.
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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

* Re: optimization/10482: Optimized and debug binaries of same application give different results.
@ 2003-04-24 16:27 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-04-24 16:27 UTC (permalink / raw)
  To: Alberto.Ribon, gcc-bugs, gcc-prs, nobody

Synopsis: Optimized and debug binaries of same application give different results.

State-Changed-From-To: open->feedback
State-Changed-By: bangerth
State-Changed-When: Thu Apr 24 16:27:18 2003
State-Changed-Why:
    There are known bugs in gcc, but if you want us to fix any
    potential problem (or tell you that what you do is invoking
    undefined behavior and therefore not a bug in gcc), then I
    guess you will have to tell us a little more than just "it
    doesn't work". Please review
      http://gcc.gnu.org/bugs.html
    for this purpose. It explains what we need. It also explains
    a couple of typical problems.
    
    Thanks
      Wolfgang

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10482


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

end of thread, other threads:[~2003-04-24 16:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-24 16:06 optimization/10482: Optimized and debug binaries of same application give different results Alberto.Ribon
2003-04-24 16:27 bangerth

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