view test/tmp8.c @ 283:230a3b98b843 mips-done

MIPS jump work.
author kono
date Mon, 24 May 2004 13:21:22 +0900
parents 096559f07a70
children a93e619cf772
line wrap: on
line source


int asize = 100;

int f(int i,int j,int k,int *l);
int g();

int
main()
{
    int a[0] ;
   printf("%d %d\n",g(),f(0,1,2,a));
   return 0; 
}

int
g()
{
   int k = 0,i;

   char *p = alloca(asize);
   for(i=0;i<100;i++) p[i]=i;
   for(i=0;i<100;i++) k += p[i];
   return k;
}

int
f(int i,int j,int k,int *l)
{
    *l = 3;
    if (i++ >20) return *l;
    return f(i,j,k,(int*)alloca(asize));
}