annotate run/new_06.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 |
b3da1b510a19 |
children |
|
rev |
line source |
378
|
1 // $HeadURL$
|
|
2 // $Date$
|
|
3 // $Author$
|
|
4
|
|
5 module dstress.run.new_06;
|
|
6
|
|
7 int counter;
|
|
8
|
|
9 class MyClass{
|
|
10 new(size_t size){
|
|
11 counter++;
|
889
|
12 return (new byte[size]).ptr;
|
378
|
13 }
|
|
14 }
|
|
15
|
|
16 int main(){
|
|
17 assert(counter==0);
|
|
18 MyClass c = new MyClass();
|
|
19 assert(counter==1);
|
|
20 return 0;
|
|
21 }
|