view test/tmp8.c @ 275:8f09f8bbc494

MIPS switch statement. basic.c passed.
author kono
date Fri, 21 May 2004 14:00:02 +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));
}