annotate run/c/const_16_B.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
935
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
1 // $HeadURL$
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
2 // $Date$
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
3 // $Author$
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
4
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
5 // @author@ Stewart Gordon <smjg_1998@yahoo.com>
89f09dbb06b6 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: 1090
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3290
935
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
8
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
9 module dstress.run.c.const_16_B;
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
10
1090
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
11 struct StructA{
935
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
12 int a;
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
13 }
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
14
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
15 const StructA s = { 1 };
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
16 const int x = s.a + 1;
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
17
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
18 int main(){
1090
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
19 if(s.a != 1){
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
20 assert(0);
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
21 }
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
22 if(x != 2){
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
23 assert(0);
f4e98d870b57 pre DMD-0.163 review
thomask
parents: 935
diff changeset
24 }
935
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
25 return 0;
89f09dbb06b6 Stewart Gordon <smjg_1998@yahoo.com>
thomask
parents:
diff changeset
26 }