Mercurial > projects > dstress
changeset 1447:ef3062e62d77
[Issue 1092] compiler crash in ..\ztc\cod1.c 2528
Vladimir <thecybershadow@gmail.com>
2007-04-03
http://d.puremagic.com/issues/show_bug.cgi?id=1092
author | thomask |
---|---|
date | Wed, 04 Apr 2007 20:28:49 +0000 |
parents | 62646ef1013a |
children | b0b70172c68b |
files | run/b/bug_cod1_2528_A.d run/b/bug_cod1_2528_B.d |
diffstat | 2 files changed, 45 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_cod1_2528_A.d Wed Apr 04 20:28:49 2007 +0000 @@ -0,0 +1,22 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Vladimir <thecybershadow@gmail.com> +// @date@ 2007-04-03 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1092 +// @desc@ [Issue 1092] compiler crash in ..\ztc\cod1.c 2528 + +module dstress.run.b.bug_cod1_2528_A; + +int main(){ + byte x = 'Z'; + void[] y = cast(void[])[x]; + + if('Z' != (cast(byte[]) y)[0]){ + assert(0); + } + + return 0; +} +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/b/bug_cod1_2528_B.d Wed Apr 04 20:28:49 2007 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Vladimir <thecybershadow@gmail.com> +// @date@ 2007-04-03 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1092 +// @desc@ [Issue 1092] compiler crash in ..\ztc\cod1.c 2528 + +module dstress.run.b.bug_cod1_2528_B; + +int main(){ + byte x = 'Z'; + byte[] y = [x]; + void[] z = cast(void[])y; + + if('Z' != (cast(byte[]) z)[0]){ + assert(0); + } + + return 0; +} +