[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#40189: c/6898: gcc produces incorrect minimization code



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: