http://d.puremagic.com/issues/show_bug.cgi?id=7734
Summary: Wrong comparison of float return value from opEquals Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: simen.kja...@gmail.com --- Comment #0 from Simen Kjaeraas <simen.kja...@gmail.com> 2012-03-19 10:57:24 PDT --- struct Foo { float opEquals(int other) { return 0.0; } } void main( ) { assert( Foo() != 3 ); } The above code generates this assembly: fldz fucompp fnstsw ax sahf je D main+25h mov eax,0Ah call main@__assert It seems to assume that FPU status flags will be all 0 when the return value is 0.0, which is simply not true - the C3 flag is 1 when the return value is 0.0. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------