http://d.puremagic.com/issues/show_bug.cgi?id=6505
Summary: Wrong code for expression involving 8 floats, only with -O Product: D Version: D1 & D2 Platform: Other OS/Version: Windows Status: NEW Severity: blocker Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2011-08-16 04:33:20 PDT --- Found this when I removed a reference to std.random from the DMD test suite. This bug is in test22.d. It was originally described in: http://www.digitalmars.com/d/archives/digitalmars/D/bugs/4766.html but wasn't reduced correctly -- it has never been fixed. It only applies when compiling with -O: the result is -nan. ---- real randx() { return 1.2; } void test1() { float x10=randx(); float x11=randx(); float x20=randx(); float x21=randx(); float y10=randx(); float y11=randx(); float y20=randx(); float y21=randx(); float tmp=( x20*x21 + y10*y10 + y10*y11 + y11*y11 + y11*y20 + y20*y20 + y10*y21 + y11*y21 + y21*y21); assert(tmp > 0); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------