annotate run/OutOfMemory_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 b8c0195059d9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
472
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
1 // $HeadURL$
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
2 // $Date$
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
3 // $Author$
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
4
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
5 // @author@ Manfred Nowak <svv1999@hotmail.com>
564
e77e4444c170 partial metadata fix
thomask
parents: 472
diff changeset
6 // @date@ 2005-04-23
1489
b8c0195059d9 changed nntp: URLs to http: URLs
thomask
parents: 755
diff changeset
7 // @uri@ http://www.digitalmars.com/pnews/read.php?server=news.digitalmars.com&group=digitalmars.D.bugs&artnum=3771
472
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
8
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
9 module dstress.run.OutOfMemory_03;
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
10
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
11 debug import std.c.stdio;
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
12
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
13 Object[] a;
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
14
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
15 int main(){
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
16 int delta= 100000;
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
17 while(1){
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
18 try{
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
19 a.length = a.length + delta;
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
20 debug fprintf(stderr,"%d ", a.length);
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
21 }catch{
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
22 debug fprintf(stderr, "Allocated array of length %d.\n", a.length);
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
23 return 0;
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
24 }
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
25 }
755
fb70ca0d80ba updated resutls of DMD-0.093 - 0.101, 0.104, 0.121, 0.140
thomask
parents: 564
diff changeset
26 assert(0);
472
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
27 }
31cca2b25cf6 OutOfMemory not called
thomask
parents:
diff changeset
28