annotate run/i/init_06_C.d @ 1539:eb6a99028b95

[Issue 1262] Local variable of struct type initialized by literal resets when compared to .init Frits van Bommel <fvbommel@wxs.nl> 2007-06-12 http://d.puremagic.com/issues/show_bug.cgi?id=1262
author thomask
date Sun, 01 Jul 2007 13:17:11 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1539
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
1 // $HeadURL$
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
2 // $Date$
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
3 // $Author$
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
4
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
5 // @author@ Frits van Bommel <fvbommel@wxs.nl>
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
6 // @date@ 2007-06-12
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
7 // @uri@ http://d.puremagic.com/issues/show_bug.cgi?id=1262
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
8 // @desc@ [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
9
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
10 module dstress.run.i.init_06_C;
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
11
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
12 struct S {
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
13 int x;
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
14 }
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
15
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
16 S s = S(10);
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
17
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
18 int main() {
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
19 if (s == S.init){
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
20 assert(0);
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
21 }else if(10 != s.x){
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
22 assert(0);
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
23 }
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
24
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
25 return 0;
eb6a99028b95 [Issue 1262] Local variable of struct type initialized by literal resets when compared to .init
thomask
parents:
diff changeset
26 }