annotate run/bug_cgcod_1489_C.d @ 1619:bebc7472a832

Fix #7.
author Christian Kamm <kamm incasoftware de>
date Sat, 07 Nov 2009 18:55:30 +0100
parents ec5e144583ea
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
478
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
1 // $HeadURL$
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
2 // $Date$
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
3 // $Author$
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
4
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
5 // @author@ Kevin Bealer <Kevin_member@pathlink.com>
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
6 // @date@ 2005-04-24
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 478
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3800
478
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
8
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
9 module dstress.run.bug_cgcod_1489_C;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
10
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
11 struct S {
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
12 int a, b, c;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
13 }
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
14
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
15 S[] x;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
16
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
17 S bug(S s){
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
18 x.length = 9;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
19 x[0] = s;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
20 return x[0];
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
21 }
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
22
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
23 int main(){
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
24 S var;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
25 var.a=2;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
26
1559
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
27 if(bug(var) != var){
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
28 assert(0);
ec5e144583ea D1 -> D2 : 1/N
thomask
parents: 1489
diff changeset
29 }
478
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
30
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
31 return 0;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
32 }
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
33