Mercurial > projects > dstress
changeset 372:f1c605ebb825
static struct function: -O -inline
Tom S <h3r3tic@remove.mat.uni.torun.pl>
2005-03-27
news:d26le9$2hsa$1@digitaldaemon.com
author | thomask |
---|---|
date | Sun, 27 Mar 2005 18:45:36 +0000 |
parents | f37683b0277b |
children | 177ce8d13eac |
files | run/bug_cod1_1648_A.d run/bug_cod1_1648_B.d |
diffstat | 2 files changed, 48 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/bug_cod1_1648_A.d Sun Mar 27 18:45:36 2005 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tom S <h3r3tic@remove.mat.uni.torun.pl> +// @date@ 2005-03-27 +// @uri@ news:d26le9$2hsa$1@digitaldaemon.com + +module dstress.run.bug_cod1_1648_A; + +struct MyStruct{ + static MyStruct bar(){ + MyStruct s; + return s; + } +} + +int main(){ + MyStruct[] array; // or any other size, can be dynamically alloc'd + array.length=2; + array[] = MyStruct.bar; + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/bug_cod1_1648_B.d Sun Mar 27 18:45:36 2005 +0000 @@ -0,0 +1,25 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ Tom S <h3r3tic@remove.mat.uni.torun.pl> +// @date@ 2005-03-27 +// @uri@ news:d26le9$2hsa$1@digitaldaemon.com + +// __DSTRESS_DFLAGS__ -inline + +module dstress.run.bug_cod1_1648_B; + +struct MyStruct{ + static MyStruct bar(){ + MyStruct s; + return s; + } +} + +int main(){ + MyStruct[] array; + array.length=2; + array[] = MyStruct.bar; + return 0; +} \ No newline at end of file