Bug#40189: c/6898: gcc produces incorrect minimization code
- To: 40189@bugs.debian.org, camm@enhanced.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org
- Subject: Bug#40189: c/6898: gcc produces incorrect minimization code
- From: reichelt@igpm.rwth-aachen.de
- Date: 22 Nov 2002 16:47:01 -0000
- Message-id: <[🔎] 20021122164701.6181.qmail@sources.redhat.com>
- Reply-to: reichelt@igpm.rwth-aachen.de, 40189@bugs.debian.org, camm@enhanced.com, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org, 40189@bugs.debian.org
Synopsis: gcc produces incorrect minimization code
State-Changed-From-To: open->closed
State-Changed-By: reichelt
State-Changed-When: Fri Nov 22 08:47:00 2002
State-Changed-Why:
Not a bug.
Whether you get ir=0 or ir=3 is just a matter when rounding will take place.
Since the code is rearranged in optimization steps, you'll get varying
results with different architectures and optimization options. Similar
but not identical code might also lead to different results.
Welcome to the world of floating point arithmetic.
BTW, declaring t and amin as "volatile double" leads to your "expected"
result even for -O0.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6898
Reply to: