annotate run/struct_initialization_06.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
307
86e4b19bc26b array init
thomask
parents:
diff changeset
1 // $HeadURL$
86e4b19bc26b array init
thomask
parents:
diff changeset
2 // $Date$
86e4b19bc26b array init
thomask
parents:
diff changeset
3 // $Author$
86e4b19bc26b array init
thomask
parents:
diff changeset
4
86e4b19bc26b array init
thomask
parents:
diff changeset
5 // @author@ Andrew Fedoniouk <news@terrainformatica.com>
86e4b19bc26b array init
thomask
parents:
diff changeset
6 // @date@ 2005-03-10
86e4b19bc26b array init
thomask
parents:
diff changeset
7 // @uri@ news:d0otkq$1fsg$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=3137
307
86e4b19bc26b array init
thomask
parents:
diff changeset
9
86e4b19bc26b array init
thomask
parents:
diff changeset
10 module dstress.run.struct_initialization_06;
86e4b19bc26b array init
thomask
parents:
diff changeset
11
86e4b19bc26b array init
thomask
parents:
diff changeset
12 struct A {
86e4b19bc26b array init
thomask
parents:
diff changeset
13 int one;
1270
660f9196b52a partial review
thomask
parents: 1086
diff changeset
14 int[4] two = 2;
307
86e4b19bc26b array init
thomask
parents:
diff changeset
15 }
86e4b19bc26b array init
thomask
parents:
diff changeset
16
1270
660f9196b52a partial review
thomask
parents: 1086
diff changeset
17 A a = { one:1 };
307
86e4b19bc26b array init
thomask
parents:
diff changeset
18
86e4b19bc26b array init
thomask
parents:
diff changeset
19 int main(){
1086
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
20 if(a.one != 1){
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
21 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
22 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
23 if(a.two[0] != 2){
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
24 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
25 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
26 if(a.two[1] != 2){
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
27 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
28 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
29 if(a.two[2] != 2){
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
30 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
31 }
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
32 if(a.two[3] != 2){
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
33 assert(0);
7e8e5013a030 gdc-0.19 review
thomask
parents: 307
diff changeset
34 }
307
86e4b19bc26b array init
thomask
parents:
diff changeset
35 return 0;
86e4b19bc26b array init
thomask
parents:
diff changeset
36 }