Mercurial > projects > dstress
annotate run/u/union_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 | 81222734adf3 |
children |
rev | line source |
---|---|
908 | 1 // $HeadURL$ |
2 // $Date$ | |
3 // $Author$ | |
4 | |
5 // @author@ <regan@netwin.co.nz> | |
6 // @date@ 2006-03-12 | |
1319
81222734adf3
sed'ed replacement of new:...http.d.puremagic.co... with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
908
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=44 |
908 | 8 |
9 module dstress.run.u.union_16_B; | |
10 | |
11 struct B { | |
12 int b1; | |
13 int b2; | |
14 } | |
15 | |
16 struct A { | |
17 int a; | |
18 union { | |
19 int c; | |
20 B b; | |
21 } | |
22 | |
23 new(size_t size){ | |
24 if(size != int.sizeof *3){ | |
25 assert(0); | |
26 } | |
27 return (new byte[size]).ptr; | |
28 } | |
29 } | |
30 | |
31 | |
32 int main(){ | |
33 A* a = new A(); | |
34 | |
35 return 0; | |
36 } |