Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 6824
Product:  
Component:  
Status: RESOLVED
Resolution: DUPLICATE of bug 323
Assigned To: Not yet assigned to anyone <unassigned@gcc.gnu.org>
Host:
Reported against  
Priority:  
Severity:  
Target Milestone:  
 
 
Target:
Reporter: have@ann.jussieu.fr
Add CC:
CC:
Remove selected CCs
Build:
URL:
Summary:
Keywords:
Known to work:
Known to fail:

Attachment Description Type Created Size Actions
fp_bug.bz2 fp_bug.bz2 application/octet-stream 2003-05-21 15:17 83.32 KB Edit
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 6824 depends on: Show dependency tree
Show dependency graph
Bug 6824 blocks:

Additional Comments:






View Bug Activity   |   Format For Printing   |   Clone This Bug


Description:   Last confirmed: Opened: 2002-05-26 12:46
Wrong optimiszed floatting point code : a same code 
in a function or in a struct (member of static function)
produces a different result when -O? flag is enabled.
-ffloat-store flag produces a better (but longer) code.
(and sometimes with -finline-functions (following the context))
(more strange cases are: using std::cout or printf may change 
the final result !)

Without -O? flag, the code is always right.

Release:
g++ version 2.95.4(20011002), 3.0.4, 3.1

Environment:
Linux Intel i686 (Pentium III)

How-To-Repeat:
Runs the same code with or without optimization flags (-O, -O2, -O3),
the code may give bad result (the good one is 0)
Longer details (flags ...) are available for 2 test cases.

------- Comment #1 From have@ann.jussieu.fr 2002-05-26 12:46 -------
Fix:
No idea.

------- Comment #2 From Richard Henderson 2002-10-02 10:41 -------
State-Changed-From-To: open->closed
State-Changed-Why: This is called computation with excess precision.
    
    See "What Every Computer Scientist Should Know about 
    Floating-Point Arithmetic" off of
    http://gcc.gnu.org/readings.html

------- Comment #3 From Andrew Pinski 2003-05-30 21:58 -------
*** Bug 11040 has been marked as a duplicate of this bug. ***

------- Comment #4 From Andrew Pinski 2003-05-30 21:59 -------
Reopening bug to ....

------- Comment #5 From Andrew Pinski 2003-05-30 22:00 -------
makr as invalid.

------- Comment #6 From Andrew Pinski 2003-05-30 23:54 -------
*** Bug 11040 has been marked as a duplicate of this bug. ***

------- Comment #7 From Andrew Pinski 2003-07-10 11:31 -------
Reopen bug to mark a dup of ...

------- Comment #8 From Andrew Pinski 2003-07-10 11:32 -------
bug 323 which is the master bug for excess precision.

------- Comment #9 From Andrew Pinski 2003-07-10 11:35 -------
Forgot to mark it as a dup of bug 323.

*** This bug has been marked as a duplicate of 323 ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug