# HG changeset patch # User thomask # Date 1167575326 0 # Node ID 198b48f868e6438fb961d815c5857fb1523dc5f6 # Parent f6001af60ca0e96a1b1a00b2209cd49e5789fb02 [Issue 766] dmd.exe crash Boris Kolar 2006-12-29 http://d.puremagic.com/issues/show_bug.cgi?id=766 diff -r f6001af60ca0 -r 198b48f868e6 run/o/opCall_03_A.d --- /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 +// @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; +} diff -r f6001af60ca0 -r 198b48f868e6 run/o/opCall_03_B.d --- /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 +// @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; +} diff -r f6001af60ca0 -r 198b48f868e6 run/o/opCall_03_C.d --- /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 +// @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; +}