Mercurial > projects > dstress
changeset 626:a57ea0ea4615
offsetof doesn't work on method-local struct members
xs0 <xs0@xs0.com>
2005-08-10
news:dddj2k$lrr$1@digitaldaemon.com
author | thomask |
---|---|
date | Sat, 13 Aug 2005 20:38:57 +0000 |
parents | ec5f4198256b |
children | caa75b9cf2f4 |
files | run/o/offsetof_80_A.d run/o/offsetof_80_B.d run/o/offsetof_80_C.d run/o/offsetof_80_D.d run/o/offsetof_80_E.d run/o/offsetof_80_F.d |
diffstat | 6 files changed, 155 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_80_A.d Sat Aug 13 20:38:57 2005 +0000 @@ -0,0 +1,23 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 <xs0@xs0.com> +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ offsetof doesn't work on method-local struct members + +module dstress.run.o.offsetof_80_A; + +int test(){ + struct Struct{ + int i; + } + + return Struct.i.offsetof; +} + +int main(){ + test(); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_80_B.d Sat Aug 13 20:38:57 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 <xs0@xs0.com> +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ offsetof doesn't work on method-local struct members + +module dstress.run.o.offsetof_80_B; + +class Outer{ + int test(){ + struct Innner{ + int i; + } + + return Innner.i.offsetof; + } +} + +int main(){ + Outer o = new Outer; + o.test(); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_80_C.d Sat Aug 13 20:38:57 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 <xs0@xs0.com> +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ offsetof doesn't work on method-local struct members + +module dstress.run.o.offsetof_80_C; + +struct Outer{ + int test(){ + struct Innner{ + int i; + } + + return Innner.i.offsetof; + } +} + +int main(){ + Outer* o = new Outer; + o.test(); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_80_D.d Sat Aug 13 20:38:57 2005 +0000 @@ -0,0 +1,26 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 <xs0@xs0.com> +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ offsetof doesn't work on method-local struct members + +module dstress.run.o.offsetof_80_D; + +struct Outer{ + int test(){ + class Innner{ + int i; + } + + return Innner.i.offsetof; + } +} + +int main(){ + Outer* o = new Outer; + o.test(); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_80_E.d Sat Aug 13 20:38:57 2005 +0000 @@ -0,0 +1,27 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 <xs0@xs0.com> +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ offsetof doesn't work on method-local struct members + +module dstress.run.o.offsetof_80_E; + +int outer(){ + int test(){ + class Innner{ + int i; + } + + return Innner.i.offsetof; + } + + return test(); +} + +int main(){ + outer(); + return 0; +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/run/o/offsetof_80_F.d Sat Aug 13 20:38:57 2005 +0000 @@ -0,0 +1,27 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// @author@ xs0 <xs0@xs0.com> +// @date@ 2005-08-10 +// @uri@ news:dddj2k$lrr$1@digitaldaemon.com +// @desc@ offsetof doesn't work on method-local struct members + +module dstress.run.o.offsetof_80_F; + +int outer(){ + int test(){ + struct Innner{ + int i; + } + + return Innner.i.offsetof; + } + + return test(); +} + +int main(){ + outer(); + return 0; +} \ No newline at end of file