annotate test/tmp4.c @ 275:8f09f8bbc494

MIPS switch statement. basic.c passed.
author kono
date Fri, 21 May 2004 14:00:02 +0900
parents f00e3bfa1b45
children 682c8ec38d45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
1 #include "stdio.h"
d35df41eac69 Initial revision
kono
parents:
diff changeset
2
d35df41eac69 Initial revision
kono
parents:
diff changeset
3 int
d35df41eac69 Initial revision
kono
parents:
diff changeset
4 main(ac,av)
d35df41eac69 Initial revision
kono
parents:
diff changeset
5 int ac;
d35df41eac69 Initial revision
kono
parents:
diff changeset
6 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
7 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
8 int i;
d35df41eac69 Initial revision
kono
parents:
diff changeset
9 i=main0(ac,av);
180
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
10 fprintf(stdout,"1: %s %d\n",av[0]+2,i);
172
096559f07a70 some check
kono
parents: 0
diff changeset
11 return 0;
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
12 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
13
d35df41eac69 Initial revision
kono
parents:
diff changeset
14 int
d35df41eac69 Initial revision
kono
parents:
diff changeset
15 main0(ac,av)
d35df41eac69 Initial revision
kono
parents:
diff changeset
16 int ac;
d35df41eac69 Initial revision
kono
parents:
diff changeset
17 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
18 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
19 int i,j,k;
d35df41eac69 Initial revision
kono
parents:
diff changeset
20 i=123;
d35df41eac69 Initial revision
kono
parents:
diff changeset
21 j=456;
d35df41eac69 Initial revision
kono
parents:
diff changeset
22 k=789;
180
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
23 fprintf(stdout,"2: %s\n",av[0]+2);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
24 goto code0(i,j,k,av,return,environment);
d35df41eac69 Initial revision
kono
parents:
diff changeset
25 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
26
d35df41eac69 Initial revision
kono
parents:
diff changeset
27 code code0(i,j,k,av,ret,retenv)
d35df41eac69 Initial revision
kono
parents:
diff changeset
28 int i,j,k;
d35df41eac69 Initial revision
kono
parents:
diff changeset
29 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
30 code (*ret)();
d35df41eac69 Initial revision
kono
parents:
diff changeset
31 void *retenv;
d35df41eac69 Initial revision
kono
parents:
diff changeset
32 {
d35df41eac69 Initial revision
kono
parents:
diff changeset
33 char *p;
180
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
34 p = av[0]+2;
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
35 fprintf(stdout,"3: i=%d j=%d k=%d av[0]=%s p=%s\n",i,j,k,av[0]+2,p);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
36 goto code1(i,j,k,av,ret,retenv);
d35df41eac69 Initial revision
kono
parents:
diff changeset
37 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
38
d35df41eac69 Initial revision
kono
parents:
diff changeset
39 code code1(i,j,k,av,ret,retenv)
d35df41eac69 Initial revision
kono
parents:
diff changeset
40 int i,j,k;
d35df41eac69 Initial revision
kono
parents:
diff changeset
41 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
42 code (*ret)();
d35df41eac69 Initial revision
kono
parents:
diff changeset
43 void *retenv;
d35df41eac69 Initial revision
kono
parents:
diff changeset
44 {
180
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
45 fprintf(stdout,"4: %s\n",av[0]+2);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
46 goto code2(i,j,k,av,ret,retenv);
d35df41eac69 Initial revision
kono
parents:
diff changeset
47 }
d35df41eac69 Initial revision
kono
parents:
diff changeset
48
d35df41eac69 Initial revision
kono
parents:
diff changeset
49 code code2(i,j,k,av,ret,retenv)
d35df41eac69 Initial revision
kono
parents:
diff changeset
50 int i,j,k;
d35df41eac69 Initial revision
kono
parents:
diff changeset
51 char *av[];
d35df41eac69 Initial revision
kono
parents:
diff changeset
52 code (*ret)();
d35df41eac69 Initial revision
kono
parents:
diff changeset
53 void *retenv;
d35df41eac69 Initial revision
kono
parents:
diff changeset
54 {
180
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
55 fprintf(stdout,"5: %s\n",av[0]+2);
f00e3bfa1b45 nkf.c compile (not correct)
kono
parents: 172
diff changeset
56 fprintf(stdout,"5: i=%d j=%d k=%d\n",i,j,k);
0
d35df41eac69 Initial revision
kono
parents:
diff changeset
57 goto (*ret)(1234),retenv;
d35df41eac69 Initial revision
kono
parents:
diff changeset
58 }