Mercurial > projects > dstress
changeset 1162:8e99969d0101
Re: [Issue 365] New: Regression: Bad code generation for floating point == and !=
Don Clugston <dac@nospam.com.au>
2006-09-29
news:efjapd$42o$1@digitaldaemon.com
author | thomask |
---|---|
date | Mon, 02 Oct 2006 08:03:06 +0000 |
parents | fbeab4835f72 |
children | c2a8690a9fca |
files | compile/o/opEquals_06_A.d compile/o/opEquals_06_B.d compile/o/opEquals_06_C.d run/d/double_31_A.d run/d/double_31_B.d run/d/double_31_C.d run/d/double_31_D.d run/f/float_28_A.d run/f/float_28_B.d run/f/float_28_C.d run/f/float_28_D.d run/o/opEquals_06_D.d run/o/opEquals_06_E.d run/o/opEquals_06_F.d run/r/real_27_A.d run/r/real_27_B.d run/r/real_27_C.d run/r/real_27_D.d |
diffstat | 18 files changed, 72 insertions(+), 140 deletions(-) [+] |
line wrap: on
line diff
--- a/compile/o/opEquals_06_A.d Mon Oct 02 08:02:59 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ <clugdbug@yahoo.com.au> -// @date@ 2006-09-24 -// @uri@ news:bug-365-3@http.d.puremagic.com/issues/ -// @desc@ [Issue 365] New: Regression: Bad code generation for floating point == and != - -module dstress.compile.o.opEquals_06_A; - -const real r = real.nan; - -static assert(r != 0); -static assert(!(r == 0)); -
--- a/compile/o/opEquals_06_B.d Mon Oct 02 08:02:59 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ <clugdbug@yahoo.com.au> -// @date@ 2006-09-24 -// @uri@ news:bug-365-3@http.d.puremagic.com/issues/ -// @desc@ [Issue 365] New: Regression: Bad code generation for floating point == and != - -module dstress.compile.o.opEquals_06_B; - -const double d = double.nan; - -static assert(d != 0); -static assert(!(d == 0)); -
--- a/compile/o/opEquals_06_C.d Mon Oct 02 08:02:59 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,16 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ <clugdbug@yahoo.com.au> -// @date@ 2006-09-24 -// @uri@ news:bug-365-3@http.d.puremagic.com/issues/ -// @desc@ [Issue 365] New: Regression: Bad code generation for floating point == and != - -module dstress.compile.o.opEquals_06_C; - -const float f = float.nan; - -static assert(f != 0); -static assert(!(f == 0)); -
--- a/run/d/double_31_A.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/d/double_31_A.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ double r = double.nan; - if(r == 0.0){ + if(r == 0){ assert(0); } + + if(r != 0){ + return 0; + } - return 0; + assert(0); }
--- a/run/d/double_31_B.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/d/double_31_B.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ double r; - if(r == 0.0){ + if(r == 0){ assert(0); } + + if(r != 0){ + return 0; + } - return 0; + assert(0); }
--- a/run/d/double_31_C.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/d/double_31_C.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ const double r = double.nan; - static if(r == 0.0){ + static if(r == 0){ assert(0); } + + static if(r != 0){ + return 0; + } - return 0; + assert(0); }
--- a/run/d/double_31_D.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/d/double_31_D.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ const double r; - static if(r == 0.0){ + static if(r == 0){ assert(0); } + + static if(r != 0){ + return 0; + } - return 0; + assert(0); }
--- a/run/f/float_28_A.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/f/float_28_A.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ float r = real.nan; - if(r == 0.0){ + if(r == 0){ assert(0); } - return 0; + if(r != 0){ + return 0; + } + + assert(0); }
--- a/run/f/float_28_B.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/f/float_28_B.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ float r; - if(r == 0.0){ + if(r == 0){ assert(0); } - return 0; + if(r != 0){ + return 0; + } + + assert(0); }
--- a/run/f/float_28_C.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/f/float_28_C.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ const float r; - static if(r == 0.0){ + static if(r == 0){ assert(0); } - return 0; + static if(r != 0){ + return 0; + } + + assert(0); }
--- a/run/f/float_28_D.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/f/float_28_D.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ const float r = real.nan; - static if(r == 0.0){ + static if(r == 0){ assert(0); } - return 0; + static if(r != 0){ + return 0; + } + + assert(0); }
--- a/run/o/opEquals_06_D.d Mon Oct 02 08:02:59 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ <clugdbug@yahoo.com.au> -// @date@ 2006-09-24 -// @uri@ news:bug-365-3@http.d.puremagic.com/issues/ -// @desc@ [Issue 365] New: Regression: Bad code generation for floating point == and != - -module dstress.run.o.opEquals_06_D; - -int main(){ - float f; - - if(f != 0){ - if(f == 0){ - assert(0); - }else{ - return 0; - } - } - assert(0); -}
--- a/run/o/opEquals_06_E.d Mon Oct 02 08:02:59 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ <clugdbug@yahoo.com.au> -// @date@ 2006-09-24 -// @uri@ news:bug-365-3@http.d.puremagic.com/issues/ -// @desc@ [Issue 365] New: Regression: Bad code generation for floating point == and != - -module dstress.run.o.opEquals_06_E; - -int main(){ - double d; - - if(d != 0){ - if(d == 0){ - assert(0); - }else{ - return 0; - } - } - assert(0); -}
--- a/run/o/opEquals_06_F.d Mon Oct 02 08:02:59 2006 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ <clugdbug@yahoo.com.au> -// @date@ 2006-09-24 -// @uri@ news:bug-365-3@http.d.puremagic.com/issues/ -// @desc@ [Issue 365] New: Regression: Bad code generation for floating point == and != - -module dstress.run.o.opEquals_06_F; - -int main(){ - real r; - - if(r != 0){ - if(r == 0){ - assert(0); - }else{ - return 0; - } - } - assert(0); -}
--- a/run/r/real_27_A.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/r/real_27_A.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ real r = real.nan; - if(r == 0.0){ + if(r == 0){ assert(0); } + + if(r != 0){ + return 0; + } - return 0; + assert(0); }
--- a/run/r/real_27_B.d Mon Oct 02 08:02:59 2006 +0000 +++ b/run/r/real_27_B.d Mon Oct 02 08:03:06 2006 +0000 @@ -12,9 +12,13 @@ int main(){ real r; - if(r == 0.0){ + if(r == 0){ assert(0); } + + if(r != 0){ + return 0; + } - return 0; + assert(0); }