digitalmars.D.bugs - [Issue 813] New: regression: optimizer & scope
- d-bugmail puremagic.com (24/24) Jan 07 2007 http://d.puremagic.com/issues/show_bug.cgi?id=813
- d-bugmail puremagic.com (15/15) Feb 02 2007 http://d.puremagic.com/issues/show_bug.cgi?id=813
http://d.puremagic.com/issues/show_bug.cgi?id=813
Summary: regression: optimizer & scope
Product: D
Version: 1.00
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: DMD
AssignedTo: bugzilla digitalmars.com
ReportedBy: thomas-dloop kuehne.cn
http://dstress.kuehne.cn/run/s/scope_16_A.d
fails only if compiled with "-O"
--
Jan 07 2007
http://d.puremagic.com/issues/show_bug.cgi?id=813
bugzilla digitalmars.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
The problem here is that 2.2 is not representable exactly. Constant folding
happens in different ways depending on if the optimizer is run or not,
resulting in slightly different answers due to roundoff error. Generally
speaking, an algorithm that depends on this is always going to have trouble.
To make the example work, use a constant that is exactly representable, like
1.25 and 2.25.
Not a compiler bug.
--
Feb 02 2007








d-bugmail puremagic.com