|
Archives
D Programming
DD.gnu digitalmars.D digitalmars.D.bugs digitalmars.D.dtl digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript |
D.gnu - gdc specific "-O" bug
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Short version of http://dstress.kuehne.cn/run/a/asm_f2xm1_01.d # int main(){ # float f = -1.0f; # # asm{ # finit; # fld f; # f2xm1; # fst f; # } # # assert(f<0); # # f += 0.5f; # # f = (f>0) ? f : -f; # # assert(f < f.epsilon * 4); // ** A ** # # f = 1.0; # # asm{ # finit; # fld f; # f2xm1; # fst f; # } # # assert(f>0); // ** B ** # # return 0; # } gdmd-0.17 -O a.d && ./a The execution asserts in ** B **. If ** A ** is commented out the executable behaves as expected. Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDk5mx3w+/yD4P9tIRAk9eAJ9lg7Z2Ikieu+pIvSPyuw70Gu7k3QCggR+y dW0vq3A5p5UQlhV2vUMKQhU= =+Tfn -----END PGP SIGNATURE----- Dec 04 2005
|