optimization/7122: -o2 processed floating point code generates bogus NaN

hanelyp@calweb.com hanelyp@calweb.com
Tue Jun 25 12:34:00 GMT 2002


>Number:         7122
>Category:       optimization
>Synopsis:       -o2 processed floating point code generates bogus NaN
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jun 25 10:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     hanelyp@calweb.com
>Release:        gcc 2.96 20000731 (redhat linux 7.1 2.96-98)
>Organization:
>Environment:
redhat linux 7.2
cygwin
>Description:
compiling with -o2 produces bogus floating point NaN. Same generated code may work right sometimes and not others.  Libraries (presumably built with this option) are affected, including atof(), sin(), cos()

call to printf() appears to patch bug in some cases.
>How-To-Repeat:
bug encountered developing http://www.calweb.com/~hanelyp/treecad/
>Fix:
As an interum, avoiding this optomization with floating point code.
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list