annotate run/bug_cgcod_1489_D.d @ 479:e4266d2a5507

cgcod.c 1489 Kevin Bealer <Kevin_member@pathlink.com> 2005-04-24 news:d4fgcc$6ob$1@digitaldaemon.com
author thomask
date Mon, 25 Apr 2005 05:26:43 +0000
parents run/bug_cgcod_1489_A.d@78025fa64bdf
children b8c0195059d9
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
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
7 // @uri@ news:d4fgcc$6ob$1@digitaldaemon.com
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
8
479
e4266d2a5507 cgcod.c 1489
thomask
parents: 478
diff changeset
9 module dstress.run.bug_cgcod_1489_D;
478
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
10
479
e4266d2a5507 cgcod.c 1489
thomask
parents: 478
diff changeset
11 class S {
478
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 return x[0] = s;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
20 }
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
21
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
22 int main(){
479
e4266d2a5507 cgcod.c 1489
thomask
parents: 478
diff changeset
23 S var=new S();
478
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
24 var.a=2;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
25
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
26 assert(var==bug(var));
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
27
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
28 return 0;
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
29 }
78025fa64bdf cgcod.c 1489
thomask
parents:
diff changeset
30