annotate run/memory_management_01.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 |
caa540af4671 |
children |
|
rev |
line source |
381
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 module dstress.run.memory_management_01;
|
|
6
|
|
7 void test(char[] arr){
|
|
8 arr[1]++;
|
|
9 }
|
|
10
|
|
11 int main(){
|
|
12 char[] c;
|
|
13 c.length=3;
|
|
14 c[0]='a';
|
|
15 c[1]='C';
|
|
16 c[2]='b';
|
|
17 test(c);
|
|
18 assert(c[0]=='a');
|
|
19 assert(c[1]=='D');
|
|
20 assert(c[2]=='b');
|
|
21 return 0;
|
|
22 }
|