Mercurial > projects > dstress
changeset 1281:bb541d535405
[Issue 731] New: Positive and negative NaN in template arguments causes link conflict
David Friedman <dvdfrdmn@users.sf.net>
2006-12-23
http://d.puremagic.com/issues/show_bug.cgi?id=731
author | thomask |
---|---|
date | Tue, 26 Dec 2006 10:46:38 +0000 |
parents | a0be8cc7caa3 |
children | 75288b41b6c7 |
files | run/t/template_51_A.d run/t/template_51_B.d run/t/template_51_C.d run/t/template_51_D.d run/t/template_51_E.d run/t/template_51_F.d run/t/template_51_G.d run/t/template_51_H.d run/t/template_51_I.d |
diffstat | 9 files changed, 225 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_A.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_A; + +template T(double v){ + const double T = v; +} + +int main(){ + double g = T!(double.nan) + T!(-double.nan); + if(g != double.nan - double.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_B.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_B; + +template T(float v){ + const float T = v; +} + +int main(){ + float g = T!(float.nan) + T!(-float.nan); + if(g != float.nan - float.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_C.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_C; + +template T(real v){ + const real T = v; +} + +int main(){ + real g = T!(real.nan) + T!(-real.nan); + if(g != real.nan - real.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_D.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_D; + +template T(idouble v){ + const idouble T = v; +} + +int main(){ + idouble g = T!(idouble.nan) + T!(-idouble.nan); + if(g != idouble.nan - idouble.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_E.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_E; + +template T(ifloat v){ + const ifloat T = v; +} + +int main(){ + ifloat g = T!(ifloat.nan) + T!(-ifloat.nan); + if(g != ifloat.nan - ifloat.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_F.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_F; + +template T(ireal v){ + const ireal T = v; +} + +int main(){ + ireal g = T!(ireal.nan) + T!(-ireal.nan); + if(g != ireal.nan - ireal.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_G.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_G; + +template T(cdouble v){ + const cdouble T = v; +} + +int main(){ + cdouble g = T!(cdouble.nan) + T!(-cdouble.nan); + if(g != cdouble.nan - cdouble.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_H.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_H; + +template T(cfloat v){ + const cfloat T = v; +} + +int main(){ + cfloat g = T!(cfloat.nan) + T!(-cfloat.nan); + if(g != cfloat.nan - cfloat.nan){ + assert(0); + } + + return 0; +} + +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/t/template_51_I.d Tue Dec 26 10:46:38 2006 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ David Friedman <dvdfrdmn@users.sf.net> +// @date@ 2006-12-23 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=731 +// @desc@ [Issue 731] New: Positive and negative NaN in template arguments causes link conflict + +module dstress.run.t.template_51_I; + +template T(creal v){ + const creal T = v; +} + +int main(){ + creal g = T!(creal.nan) + T!(-creal.nan); + if(g != creal.nan - creal.nan){ + assert(0); + } + + return 0; +} + +