annotate run/memory_management_03.d @ 1576:b3e16c86558e
[Issue 1398] New: GDC doesn't generate correct code
<mariusmuja@gmail.com>
2007-08-04
http://d.puremagic.com/issues/show_bug.cgi?id=1398
author |
thomask |
date |
Thu, 21 Feb 2008 15:20:08 +0000 |
parents |
38ea1bb385b6 |
children |
|
rev |
line source |
381
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 module dstress.run.memory_management_03;
|
|
6
|
870
|
7 void test(bool[] arr){
|
381
|
8 arr[1] = !arr[1];
|
|
9 }
|
|
10
|
|
11 int main(){
|
870
|
12 bool[] c;
|
381
|
13 c.length=3;
|
|
14 c[0]=true;
|
|
15 c[1]=false;
|
|
16 c[2]=false;
|
|
17 test(c);
|
|
18 assert(c[0]==true);
|
|
19 assert(c[1]==true);
|
|
20 assert(c[2]==false);
|
|
21 return 0;
|
|
22 }
|