Mercurial > hg > CbC > old > device
annotate test/tmp8.c @ 172:096559f07a70
some check
author | kono |
---|---|
date | Tue, 25 Nov 2003 11:47:41 +0900 |
parents | fdbf2fbc8140 |
children | a93e619cf772 |
rev | line source |
---|---|
17 | 1 |
172 | 2 int asize = 100; |
3 | |
4 int f(int i,int j,int k,int *l); | |
5 int g(); | |
6 | |
7 int | |
8 main() | |
9 { | |
10 int a[0] ; | |
11 printf("%d %d\n",g(),f(0,1,2,a)); | |
12 return 0; | |
13 } | |
17 | 14 |
15 int | |
172 | 16 g() |
17 | 17 { |
172 | 18 int k = 0,i; |
19 | |
20 char *p = alloca(asize); | |
21 for(i=0;i<100;i++) p[i]=i; | |
22 for(i=0;i<100;i++) k += p[i]; | |
23 return k; | |
17 | 24 } |
172 | 25 |
26 int | |
27 f(int i,int j,int k,int *l) | |
28 { | |
29 *l = 3; | |
30 if (i++ >20) return *l; | |
31 return f(i,j,k,(int*)alloca(asize)); | |
32 } |