annotate run/s/struct_initialization_12_C.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 d40d75fcd5c5
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1558
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
1 // $HeadURL$
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
2 // $Date$
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
3 // $Author$
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
4
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
5 // @author@ Matti Niemenmaa <deewiant@gmail.com>
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
6 // @date@ 2007-06-15
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1268
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
8 // @desc@ [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
9
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
10 module dstress.run.s.struct_initialization_12_C;
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
11
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
12 typedef int I = 13;
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
13
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
14 struct S{
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
15 I[5] x;
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
16 }
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
17
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
18 int main(){
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
19 S s;
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
20 for(size_t i = 0; i < 5; i++){
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
21 if(13 != s.x[i]){
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
22 assert(0);
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
23 }
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
24 }
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
25 return 0;
d40d75fcd5c5 [Issue 1268] Struct literals try to initialize static arrays of non-static structs incorrectly
thomask
parents:
diff changeset
26 }