annotate run/with_13.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 d3a3e0c251d8
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
281
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
1 // $HeadURL$
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
2 // $Date$
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
3 // $Author$
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
4
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
5 // @author@ Manfred Nowak <svv1999@hotmail.com>
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
6 // @date@ 2005-02-03
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
7 // @uri@ news:cttuih$hpb$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=2852
281
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
9
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
10 module dstress.run.with_13;
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
11
1125
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
12 struct Entry{
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
13 int a;
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
14 }
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
15
281
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
16 class Class{
1125
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
17 Entry[] table;
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
18
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
19 this(){
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
20 table = new Entry[10];
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
21 table[1].a = 4;
281
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
22 }
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
23
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
24 Entry opIndex(int i){
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
25 return table[i];
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
26 }
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
27 }
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
28
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
29 int main(){
1125
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
30 Class c= new Class();
281
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
31
1125
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
32 with(c[1]){
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
33 if(a != 4){
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
34 assert(0);
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
35 }
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
36 a++;
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
37 }
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
38 if(c[1].a != 4){
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
39 assert(0);
281
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
40 }
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
41
b8b7a330468a with and opIndex
thomask
parents:
diff changeset
42 return 0;
1125
a929acac9127 various test case fixes
thomask
parents: 281
diff changeset
43 }