public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication
@ 2004-10-08 16:11 fjahanian at apple dot com
  2004-10-08 16:59 ` [Bug tree-optimization/17892] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: fjahanian at apple dot com @ 2004-10-08 16:11 UTC (permalink / raw)
  To: gcc-bugs

In the following code the repeated multiplication is folded into a single operation 
(multiplication by Infinity). 
For different values of "x" this leads to undeserved or absent floating point exceptions, and 
breaks some of the elementary math functions in Libm. Occurs at optimization O1 and higher. 

static const double C = 0x1.0p1023;

double foo(double x)
{
        return ( ( (x * C) * C ) * C );
}

-- 
           Summary: gcc-4.0 should not reassociate floating point add or
                    multiplication
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P1
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: fjahanian at apple dot com
                CC: gcc-bugs at gcc dot gnu dot org,roger at eyesopen dot
                    com
 GCC build triplet: powerpc-apple-darwin
  GCC host triplet: powerpc-apple-darwin
GCC target triplet: powerpc-apple-darwin


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

* [Bug tree-optimization/17892] [4.0 Regression] gcc-4.0 should not reassociate floating point add or multiplication
  2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
@ 2004-10-08 16:59 ` pinskia at gcc dot gnu dot org
  2004-10-12 20:50 ` cvs-commit at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-08 16:59 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-08 16:59 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |wrong-code
   Last reconfirmed|0000-00-00 00:00:00         |2004-10-08 16:59:47
               date|                            |
            Summary|gcc-4.0 should not          |[4.0 Regression] gcc-4.0
                   |reassociate floating point  |should not reassociate
                   |add or multiplication       |floating point add or
                   |                            |multiplication
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

* [Bug tree-optimization/17892] [4.0 Regression] gcc-4.0 should not reassociate floating point add or multiplication
  2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
  2004-10-08 16:59 ` [Bug tree-optimization/17892] [4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2004-10-12 20:50 ` cvs-commit at gcc dot gnu dot org
  2004-10-12 20:57 ` fjahanian at apple dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-10-12 20:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-10-12 20:50 -------
Subject: Bug 17892

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fjahanian@gcc.gnu.org	2004-10-12 20:50:08

Modified files:
	gcc            : ChangeLog tree-outof-ssa.c tree-ssa-dom.c 
Added files:
	gcc/testsuite/gcc.c-torture/execute/ieee: unsafe-fp-assoc.c 

Log message:
	PR 17892.
	OKed by Roger Sayle.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.5850&r2=2.5851
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-outof-ssa.c.diff?cvsroot=gcc&r1=2.25&r2=2.26
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dom.c.diff?cvsroot=gcc&r1=2.58&r2=2.59
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/unsafe-fp-assoc.c.diff?cvsroot=gcc&r1=NONE&r2=1.1



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

* [Bug tree-optimization/17892] [4.0 Regression] gcc-4.0 should not reassociate floating point add or multiplication
  2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
  2004-10-08 16:59 ` [Bug tree-optimization/17892] [4.0 Regression] " pinskia at gcc dot gnu dot org
  2004-10-12 20:50 ` cvs-commit at gcc dot gnu dot org
@ 2004-10-12 20:57 ` fjahanian at apple dot com
  2004-10-12 22:28 ` pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fjahanian at apple dot com @ 2004-10-12 20:57 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From fjahanian at apple dot com  2004-10-12 20:57 -------
tree-outof-ssa.c is not part of this patch. I accidentally checked it in. I have since backed it out.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

* [Bug tree-optimization/17892] [4.0 Regression] gcc-4.0 should not reassociate floating point add or multiplication
  2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
                   ` (2 preceding siblings ...)
  2004-10-12 20:57 ` fjahanian at apple dot com
@ 2004-10-12 22:28 ` pinskia at gcc dot gnu dot org
  2004-11-10 17:19 ` cvs-commit at gcc dot gnu dot org
  2004-11-10 19:07 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-10-12 22:28 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-10-12 22:28 -------
Fixed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

* [Bug tree-optimization/17892] [4.0 Regression] gcc-4.0 should not reassociate floating point add or multiplication
  2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
                   ` (3 preceding siblings ...)
  2004-10-12 22:28 ` pinskia at gcc dot gnu dot org
@ 2004-11-10 17:19 ` cvs-commit at gcc dot gnu dot org
  2004-11-10 19:07 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-10 17:19 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-10 17:18 -------
Subject: Bug 17892

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fjahanian@gcc.gnu.org	2004-11-10 17:18:01

Modified files:
	gcc            : tree-ssa-dom.c ChangeLog 
	gcc/testsuite  : ChangeLog 

Log message:
	Fix for PR tree-optimization/17892.
	OKed by Roger Sayle.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-dom.c.diff?cvsroot=gcc&r1=2.65&r2=2.66
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6263&r2=2.6264
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4570&r2=1.4571



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

* [Bug tree-optimization/17892] [4.0 Regression] gcc-4.0 should not reassociate floating point add or multiplication
  2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
                   ` (4 preceding siblings ...)
  2004-11-10 17:19 ` cvs-commit at gcc dot gnu dot org
@ 2004-11-10 19:07 ` cvs-commit at gcc dot gnu dot org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-11-10 19:07 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-11-10 19:07 -------
Subject: Bug 17892

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	fjahanian@gcc.gnu.org	2004-11-10 19:06:54

Added files:
	gcc/testsuite/gcc.c-torture/execute/ieee: unsafe-fp-assoc-1.c 

Log message:
	Test for PR tree-optimization/17892.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.c-torture/execute/ieee/unsafe-fp-assoc-1.c.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17892


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

end of thread, other threads:[~2004-11-10 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-08 16:11 [Bug tree-optimization/17892] New: gcc-4.0 should not reassociate floating point add or multiplication fjahanian at apple dot com
2004-10-08 16:59 ` [Bug tree-optimization/17892] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-12 20:50 ` cvs-commit at gcc dot gnu dot org
2004-10-12 20:57 ` fjahanian at apple dot com
2004-10-12 22:28 ` pinskia at gcc dot gnu dot org
2004-11-10 17:19 ` cvs-commit at gcc dot gnu dot org
2004-11-10 19:07 ` cvs-commit at gcc dot gnu dot org

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