# HG changeset patch # User thomask # Date 1116588179 0 # Node ID cfb2579092fc11fc0f16080dab0fc9f323a2f67a # Parent a9a4ec32f7a0b14848d2d1659a4bbc0b3c082f0f updated .offsetof to DMD-0.124 diff -r a9a4ec32f7a0 -r cfb2579092fc nocompile/o/offsetof_01.d --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nocompile/o/offsetof_01.d Fri May 20 11:22:59 2005 +0000 @@ -0,0 +1,17 @@ +// $HeadURL$ +// $Date$ +// $Author$ + +// __DSTRESS_ELINE__ 15 + +module dstress.nocompile.o.offsetof_01; + +struct MyStruct{ + int a; +} + +int main(){ + MyStruct s; + s.a = s.a.offsetof; + return 0; +} diff -r a9a4ec32f7a0 -r cfb2579092fc run/offsetof_01.d --- a/run/offsetof_01.d Fri May 20 11:06:55 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,20 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -module dstress.run.offsetof_01; - -struct MyStruct{ - int a; - int b; -} - -int main(){ - MyStruct s; - - assert(s.a.offsetof >= 0); - assert(s.b.offsetof >= 0); - assert(s.a.offsetof != s.b.offsetof); - - return 0; -} diff -r a9a4ec32f7a0 -r cfb2579092fc run/offsetof_79.d --- a/run/offsetof_79.d Fri May 20 11:06:55 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ brad beveridge -// @date@ 2005-04-25 -// @uri@ news:d4ie14$1evb$1@digitaldaemon.com - -module dstress.run.offsetof_79; - -size_t res; - -class Foo{ - float a; -} - -class Bar{ - void test(){ - assert((new Foo).a.offsetof==res); - } -} - -int main(){ - res=(new Foo).a.offsetof; - Bar b = new Bar; - b.test(); - return 0; -} diff -r a9a4ec32f7a0 -r cfb2579092fc run/offsetof_80.d --- a/run/offsetof_80.d Fri May 20 11:06:55 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,28 +0,0 @@ -// $HeadURL$ -// $Date$ -// $Author$ - -// @author@ brad beveridge -// @date@ 2005-04-25 -// @uri@ news:d4ie14$1evb$1@digitaldaemon.com - -module dstress.run.offsetof_80; - -size_t res; - -struct Foo{ - float a; -} - -struct Bar{ - void test(){ - assert((new Foo).a.offsetof==res); - } -} - -int main(){ - res=Foo.a.offsetof; - Bar* b = new Bar; - b.test(); - return 0; -}