Mercurial > projects > dstress
annotate run/s/struct_initialization_08_A.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 | daef239f37cf |
children |
rev | line source |
---|---|
1252
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
1 // $HeadURL$ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
2 // $Date$ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
3 // $Author$ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
4 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
5 // @author@ David Friedman <dvdfrdmn@users.sf.net> |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
6 // @date@ 2006-12-07 |
1320
daef239f37cf
sed'ed replacement of new:...http.d.puremagic.com/issues/ with http://d.puremagic.com/issues/show_bug.cgi?...
thomask
parents:
1252
diff
changeset
|
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=661 |
1252
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
8 // @desc@ [Issue 661] New: Error using a zero-init struct's init property |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
9 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
10 module dstress.run.s.struct_initialization_08_A; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
11 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
12 struct S { |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
13 int x = 0x12_34_AF_D1; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
14 } |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
15 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
16 int main() { |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
17 S s; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
18 s.x = 1; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
19 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
20 s = s.init; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
21 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
22 if(s.x != 0x12_34_AF_D1){ |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
23 assert(0); |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
24 } |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
25 |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
26 return 0; |
e8cc5e77c457
[Issue 661] New: Error using a zero-init struct's init property
thomask
parents:
diff
changeset
|
27 } |