annotate run/const_15.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 b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
347
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
4
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
6 // @date@ 2005-03-21
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 347
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3290
347
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
8
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
9 module dstress.run.const_15;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
10
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
11 struct StructA{
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
12 int a;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
13 }
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
14
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
15 const int i = 15;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
16
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
17 const StructA s1 = { i+1 };
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
18 const StructA s2 = { s1.a+1 };
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
19
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
20 int main(){
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
21 assert(s1.a == 16);
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
22 assert(s2.a == 17);
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
23 return 0;
be3b6d528ac0 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
24 }