annotate run/offsetof_70.d @ 1576:b3e16c86558e

[Issue 1398] New: GDC doesn't generate correct code <mariusmuja@gmail.com> 2007-08-04 http://d.puremagic.com/issues/show_bug.cgi?id=1398
author thomask
date Thu, 21 Feb 2008 15:20:08 +0000
parents d3a3e0c251d8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
302
41de5acbb735 offsetof
thomask
parents:
diff changeset
1 // $HeadURL$
41de5acbb735 offsetof
thomask
parents:
diff changeset
2 // $Date$
41de5acbb735 offsetof
thomask
parents:
diff changeset
3 // $Author$
41de5acbb735 offsetof
thomask
parents:
diff changeset
4
41de5acbb735 offsetof
thomask
parents:
diff changeset
5 // @author@ <derick_eddington@nospam.yahoo.nospam.com>
41de5acbb735 offsetof
thomask
parents:
diff changeset
6 // @date@ 2005-03-06
41de5acbb735 offsetof
thomask
parents:
diff changeset
7 // @uri@ news:d0dfb6$1mrv$1@digitaldaemon.com
1384
d3a3e0c251d8 nntp: -> http:
thomask
parents: 1383
diff changeset
8 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3091
302
41de5acbb735 offsetof
thomask
parents:
diff changeset
9
41de5acbb735 offsetof
thomask
parents:
diff changeset
10 module dstress.run.offsetof_70;
41de5acbb735 offsetof
thomask
parents:
diff changeset
11
41de5acbb735 offsetof
thomask
parents:
diff changeset
12 struct MyStruct{
41de5acbb735 offsetof
thomask
parents:
diff changeset
13 dchar[] x;
41de5acbb735 offsetof
thomask
parents:
diff changeset
14 }
41de5acbb735 offsetof
thomask
parents:
diff changeset
15
41de5acbb735 offsetof
thomask
parents:
diff changeset
16 int main(){
41de5acbb735 offsetof
thomask
parents:
diff changeset
17 size_t t = MyStruct.x.offsetof;
41de5acbb735 offsetof
thomask
parents:
diff changeset
18 return 0;
41de5acbb735 offsetof
thomask
parents:
diff changeset
19 }