annotate test/tmp8.c @ 172:096559f07a70

some check
author kono
date Tue, 25 Nov 2003 11:47:41 +0900
parents fdbf2fbc8140
children a93e619cf772
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17
fdbf2fbc8140 *** empty log message ***
kono
parents:
diff changeset
1
172
096559f07a70 some check
kono
parents: 17
diff changeset
2 int asize = 100;
096559f07a70 some check
kono
parents: 17
diff changeset
3
096559f07a70 some check
kono
parents: 17
diff changeset
4 int f(int i,int j,int k,int *l);
096559f07a70 some check
kono
parents: 17
diff changeset
5 int g();
096559f07a70 some check
kono
parents: 17
diff changeset
6
096559f07a70 some check
kono
parents: 17
diff changeset
7 int
096559f07a70 some check
kono
parents: 17
diff changeset
8 main()
096559f07a70 some check
kono
parents: 17
diff changeset
9 {
096559f07a70 some check
kono
parents: 17
diff changeset
10 int a[0] ;
096559f07a70 some check
kono
parents: 17
diff changeset
11 printf("%d %d\n",g(),f(0,1,2,a));
096559f07a70 some check
kono
parents: 17
diff changeset
12 return 0;
096559f07a70 some check
kono
parents: 17
diff changeset
13 }
17
fdbf2fbc8140 *** empty log message ***
kono
parents:
diff changeset
14
fdbf2fbc8140 *** empty log message ***
kono
parents:
diff changeset
15 int
172
096559f07a70 some check
kono
parents: 17
diff changeset
16 g()
17
fdbf2fbc8140 *** empty log message ***
kono
parents:
diff changeset
17 {
172
096559f07a70 some check
kono
parents: 17
diff changeset
18 int k = 0,i;
096559f07a70 some check
kono
parents: 17
diff changeset
19
096559f07a70 some check
kono
parents: 17
diff changeset
20 char *p = alloca(asize);
096559f07a70 some check
kono
parents: 17
diff changeset
21 for(i=0;i<100;i++) p[i]=i;
096559f07a70 some check
kono
parents: 17
diff changeset
22 for(i=0;i<100;i++) k += p[i];
096559f07a70 some check
kono
parents: 17
diff changeset
23 return k;
17
fdbf2fbc8140 *** empty log message ***
kono
parents:
diff changeset
24 }
172
096559f07a70 some check
kono
parents: 17
diff changeset
25
096559f07a70 some check
kono
parents: 17
diff changeset
26 int
096559f07a70 some check
kono
parents: 17
diff changeset
27 f(int i,int j,int k,int *l)
096559f07a70 some check
kono
parents: 17
diff changeset
28 {
096559f07a70 some check
kono
parents: 17
diff changeset
29 *l = 3;
096559f07a70 some check
kono
parents: 17
diff changeset
30 if (i++ >20) return *l;
096559f07a70 some check
kono
parents: 17
diff changeset
31 return f(i,j,k,(int*)alloca(asize));
096559f07a70 some check
kono
parents: 17
diff changeset
32 }