annotate nocompile/o/offsetof_02.d @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents ec5f4198256b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
625
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
1 // $HeadURL$
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
2 // $Date$
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
3 // $Author$
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
4
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
5 // __DSTRESS_ELINE__ 17
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
6
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
7 module dstress.run.offsetof_02;
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
8
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
9 class MyClass{
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
10 int a;
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
11 int b;
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
12 }
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
13
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
14 int main(){
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
15 MyClass c;
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
16
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
17 assert(c.a.offsetof >= 0);
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
18 assert(c.b.offsetof >= 0);
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
19 assert(c.a.offsetof != c.b.offsetof);
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
20
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
21 return 0;
ec5f4198256b updated <class>.ofsettof tests
thomask
parents:
diff changeset
22 }