public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* optimization/2175: fold in fold_const.c associates non-multiply expressions
@ 2001-04-01 0:00 lucier
0 siblings, 0 replies; 2+ messages in thread
From: lucier @ 2001-04-01 0:00 UTC (permalink / raw)
To: gcc-gnats
>Number: 2175
>Category: optimization
>Synopsis: fold in fold_const.c associates non-multiply expressions
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: wrong-code
>Submitter-Id: net
>Arrival-Date: Sun Mar 04 23:06:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: B. Lucier
>Release: 3.0 prerelease and 3.1 experimental
>Organization:
>Environment:
all
>Description:
The comment in fold in fold_const.c implies that
operands of multiply expressions are associated when
-ffast-math if that may help optimization, but the
test for this should be code == MULT_EXPR, not
code != MULT_EXPR.
>How-To-Repeat:
Compile this file with -O2 -ffast-math and run it:
double x = -1.0e100;
int main()
{
if ((1.0e100 + x) + 1.0 != 1.0)
abort();
return 0;
}
It aborts because gcc reassociates the addition, when it
shouldn't. This is a regression from gcc-2.95.2.
>Fix:
Change code != MULT_EXPR to code == MULT_EXPR around line
5550 of gcc/fold-const.c.
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: optimization/2175: fold in fold_const.c associates non-multiply expressions
@ 2002-02-04 13:34 toon
0 siblings, 0 replies; 2+ messages in thread
From: toon @ 2002-02-04 13:34 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, lucier, nobody
Synopsis: fold in fold_const.c associates non-multiply expressions
State-Changed-From-To: open->closed
State-Changed-By: toon
State-Changed-When: Mon Feb 4 13:34:48 2002
State-Changed-Why:
Fixed in 3.1.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2175
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-02-04 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-01 0:00 optimization/2175: fold in fold_const.c associates non-multiply expressions lucier
2002-02-04 13:34 toon
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).