Mercurial > projects > dstress
changeset 1314:198b48f868e6
[Issue 766] dmd.exe crash
Boris Kolar <boris.kolar@globera.com>
2006-12-29
http://d.puremagic.com/issues/show_bug.cgi?id=766
author | thomask |
---|---|
date | Sun, 31 Dec 2006 14:28:46 +0000 |
parents | f6001af60ca0 |
children | 37c81d3385b7 |
files | run/o/opCall_03_A.d run/o/opCall_03_B.d run/o/opCall_03_C.d |
diffstat | 3 files changed, 88 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCall_03_A.d Sun Dec 31 14:28:46 2006 +0000 @@ -0,0 +1,32 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Boris Kolar <boris.kolar@globera.com> +// @date@ 2006-12-29 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=766 +// @desc@ [Issue 766] dmd.exe crash + +module dstress.run.o.opCall_03_A; + +struct Foo{ + static Foo opCall() { + Foo f = Foo.init; + f.a = "abc"; + return f; + } + + char[] a; + bool b = true; +} + +int main(){ + Foo f = Foo(); + if(f.a != "abc"){ + assert(0); + } + if(!f.b){ + assert(0); + } + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCall_03_B.d Sun Dec 31 14:28:46 2006 +0000 @@ -0,0 +1,30 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Boris Kolar <boris.kolar@globera.com> +// @date@ 2006-12-29 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=766 +// @desc@ [Issue 766] dmd.exe crash + +module dstress.run.o.opCall_03_B; + +struct Foo{ + static Foo opCall() { + return Foo.init; + } + + char[] a; + bool b = true; +} + +int main(){ + Foo f = Foo(); + if(f.a.length != 0){ + assert(0); + } + if(!f.b){ + assert(0); + } + return 0; +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/opCall_03_C.d Sun Dec 31 14:28:46 2006 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Boris Kolar <boris.kolar@globera.com> +// @date@ 2006-12-29 +// @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=766 +// @desc@ [Issue 766] dmd.exe crash + +module dstress.run.o.opCall_03_C; + +struct Foo{ + static Foo opCall() { + return Foo.init; + } + + bool b = true; +} + +int main(){ + Foo f = Foo(); + if(!f.b){ + assert(0); + } + return 0; +}