annotate run/InExpression_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 557e7af55dfc
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
180
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
1 // $HeadURL$
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
2 // $Date$
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
3 // $Author$
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
4
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
5 module dstress.run.InExpression_02;
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
6
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
7 int main(){
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
8 int value=1;
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
9 char[] key = "eins";
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
10 int[char[]] array;
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
11
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
12 array[key]=value;
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
13 int* ptr = key in array;
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
14
312
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
15 assert(value == *ptr);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
16
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
17 value=2;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
18 assert(value == 2);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
19 assert(*ptr == 1);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
20
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
21 *ptr = 3;
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
22 assert(value == 2);
557e7af55dfc associative arrays store copies (native, struct) and references (class)
thomask
parents: 180
diff changeset
23 assert(*ptr == 3);
180
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
24
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
25 return 0;
da000f026b76 1) added InExpression tests
thomask
parents:
diff changeset
26 }