view test/too-long-argument.c @ 720:6b7372e17970

*** empty log message ***
author kono
date Sat, 12 Apr 2008 03:53:11 +0900
parents 682c8ec38d45
children 3f1f6c0610c1
line wrap: on
line source

#include <stdio.h>

#undef WRONGNUMBER

typedef __code
(*CCC)( int f1,int f2,int f3,int f4,int f5,int f6,int f7,int f8,int f9,int fa,int fb,int fc,int fd,int fe,int ff,
	__code(*ret)(int),
	void *env);

__code
tcode2( int f1,int f2,int f3,int f4,int f5,int f6,int f7,int f8,int f9,int fa,int fb,int fc,int fd,int fe,int ff,
	__code(*ret)(int),
	void *env)
{
fprintf(stdout,"tcode2: f1=%d,f2=%d,f3=%d,f4=%d,f5=%d,f6=%d,f7=%d,f8=%d,f9=%d,fa=%d,fb=%d,fc=%d,fd=%d,fe=%d,ff=%d\n",
f1,f2,f3,f4,f5,f6,f7,f8,f9,fa,fb,fc,fd,fe,ff);
     goto ret(0),env;
}

__code
tcode1(f1,f2,f3,f4,f5,f6,f7,f8,f9,fa,fb,fc,fd,fe,ff,ret,env)
	int f1,f2,f3,f4,f5,f6,f7,f8,f9,fa,fb,fc,fd,fe,ff;
	__code(*ret)(int);
	void *env;
{
fprintf(stdout,"tcode1: f1=%d,f2=%d,f3=%d,f4=%d,f5=%d,f6=%d,f7=%d,f8=%d,f9=%d,fa=%d,fb=%d,fc=%d,fd=%d,fe=%d,ff=%d\n",
f1,f2,f3,f4,f5,f6,f7,f8,f9,fa,fb,fc,fd,fe,ff);
     goto ret(0),env;
}

__code
tcode4(int x,int y,CCC junction,__code(*ret)(int),void *env)
{
#ifdef WRONGNUMBER
     goto junction(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,ret,env);
#else
     goto junction(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,ret,env);
#endif
}

__code
tcode0(int x,int y,__code(*junction)(int,int,int,int,int,int,int,int,int,int,int,int,int,int,int,__code(*)(int),void *),__code(*ret)(int),void *env)
{
#ifdef WRONGNUMBER
     goto junction(0,1,2,3,4,5,6,7,8,9,10,11,12,13,ret,env);
#else
     goto junction(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,ret,env);
#endif
}

int
main0()
{
#ifdef WRONGNUMBER
     goto tcode2(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,
	__return,__environment);
#else
     goto tcode2(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,
	__return,__environment);
#endif
}

int
main1()
{
#ifdef WRONGNUMBER
     goto tcode1(0,1,2,3,4,5,6,7,8,9,10,11,12,13,
	__return,__environment);
#else
     goto tcode1(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,
	__return,__environment);
#endif
}

int
main2()
{
     goto tcode0(0,1,tcode1,__return,__environment);
}

int
main4()
{
     goto tcode4(0,1,tcode2,__return,__environment);
}

int
main()
{
    printf("#0089:main4\n");
    main4();
    printf("#0091:main2\n");
    main2();
    printf("#0093:main0\n");
    main0();
    printf("#0095:main1\n");
    main1();
return 0;
}

//