459
|
1 const int a = 5,b = -3;
|
|
2 int kkkk = 333;
|
|
3 static const int as = 5,bs = -3;
|
|
4 const char hoo[] = "test";
|
517
|
5 char hoo0[] = "test";
|
459
|
6 static const char haa[] = "test";
|
|
7 static inline const int f(int k);
|
|
8
|
460
|
9 volatile const int i = 3;
|
|
10
|
|
11 extern int printf(char *,...);
|
|
12 int
|
|
13 main0()
|
|
14 {
|
|
15 volatile const int j = 3;
|
|
16 switch(i) {
|
|
17 case 1: printf("#0015:1\n"); break;
|
|
18 case 2: printf("#0016:2\n"); break;
|
|
19 case 3: printf("#0017:3\n"); break;
|
|
20 case 4: printf("#0018:4\n"); break;
|
|
21 }
|
|
22 switch(j) {
|
|
23 case 1: printf("#0021:1\n"); break;
|
|
24 case 2: printf("#0022:2\n"); break;
|
|
25 case 3: printf("#0023:3\n"); break;
|
|
26 case 4: printf("#0024:4\n"); break;
|
|
27 }
|
|
28 return 0;
|
|
29 }
|
|
30
|
|
31
|
459
|
32 extern int printf(char *,...);
|
|
33
|
|
34 static inline const int f(int k)
|
|
35 {
|
|
36 return k+1;
|
|
37 }
|
|
38
|
|
39 inline int in1(int i,int j)
|
|
40 {
|
|
41 if (i>j) return j;
|
|
42 else return i;
|
|
43 }
|
|
44
|
|
45 static
|
|
46 inline int ins(int i,int j)
|
|
47 {
|
460
|
48 printf("#0046:%d %d\n",i,j);
|
459
|
49 if (f(i)>j) return j;
|
|
50 else return i;
|
|
51 }
|
|
52
|
|
53 static
|
516
|
54 inline int ins1(int i,int j, int k)
|
459
|
55 {
|
516
|
56 printf("#0054:%d %d %d\n",i,j,k);
|
459
|
57 if (f(i)>j) return j;
|
|
58 else return i;
|
|
59 }
|
|
60
|
460
|
61 inline __attribute__((always_inline)) int in2(int p,int i,int j)
|
459
|
62 {
|
534
|
63 int k = -20,m;
|
459
|
64 do {
|
|
65 k += 3;
|
|
66 } while ( k < j);
|
460
|
67 printf("#0065: %d do %d\n",p,k);
|
459
|
68
|
534
|
69 while (k > j) {
|
459
|
70 k -= 3;
|
534
|
71 }
|
460
|
72 printf("#0070: %d while %d\n",p,k);
|
459
|
73
|
|
74 m = 0;
|
|
75 for(k=0;k<j;k++) {
|
|
76 m += k;
|
|
77 }
|
460
|
78 printf("#0076: %d for %d\n",p,m);
|
459
|
79
|
|
80 switch(i) {
|
|
81 case 1: k = 1;
|
|
82 break;
|
|
83 case 2: k = 2;
|
|
84 break;
|
|
85 case 3: k = 3;
|
|
86 break;
|
|
87 case 4: k = 4;
|
|
88 break;
|
|
89 default: k = 5;
|
|
90 }
|
460
|
91 printf("#0089: %d switch %d\n",p,k);
|
459
|
92
|
|
93 for(k=0;k<j;k++) {
|
|
94 i += k;
|
|
95 if (k<3) continue;
|
|
96 }
|
460
|
97 printf("#0095: %d for %d\n",p,i);
|
459
|
98 goto hoge;
|
|
99 hage:
|
|
100 goto hage;
|
|
101 hoge:
|
|
102 return 0;
|
|
103
|
|
104 }
|
|
105
|
516
|
106 int (*fnp)(int i,int j,int k);
|
459
|
107
|
|
108 int (*fnp3)(int i,int j,int k);
|
|
109
|
|
110 void
|
|
111 a0(int k,int j)
|
|
112 {
|
|
113 int k1,j1;
|
|
114 const int v=3,x=6;
|
|
115 // a = 10;
|
|
116
|
|
117 k1 = in1(a,b);
|
460
|
118 printf("#0116:%d %d %d\n",a,b,k1);
|
459
|
119 j1 = in1(k,j-6)+f(k1);
|
460
|
120 printf("#0118:%d %d %s\n",k1,j1,hoo);
|
459
|
121 k1 = &v-&x>0? &v-&x : &x-&v;
|
460
|
122 printf("#0120:v-x: %d\n",k1);
|
459
|
123
|
|
124 k1 = ins(a,b);
|
|
125 j1 = ins(k,j-6)+f(k1);
|
460
|
126 printf("#0124:%d %d %s\n",k1,j1,haa);
|
459
|
127
|
|
128 k1 = ins(as,bs);
|
|
129 j1 = ins(k,j-6)+f(k1);
|
460
|
130 printf("#0128:%d %d %s\n",k1,j1,haa);
|
459
|
131
|
|
132 k1 = ins(v,x);
|
|
133 j1 = ins(k,j-6)+f(v);
|
460
|
134 printf("#0132:%d %d %s\n",k1,j1,haa);
|
459
|
135
|
516
|
136 k1 = fnp(v,x,5);
|
|
137 j1 = ins1(k,j-6,6)+f(v);
|
460
|
138 printf("#0136:%d %d %s\n",k1,j1,haa);
|
459
|
139 }
|
|
140
|
|
141 void
|
|
142 a1(int k,int j)
|
|
143 {
|
|
144 in2(1,k,j);
|
|
145 in2(2,3,10);
|
|
146 in2(3,k,10);
|
|
147 in2(4,2,j);
|
|
148 in2(5,2,1);
|
|
149 in2(6,0,2);
|
460
|
150 in2(8,j*3,in2(7,k+3,10-j));
|
|
151 fnp3(9,0,2);
|
459
|
152 }
|
|
153
|
515
|
154 static
|
|
155 inline int order(int a0,int a1,int a2, int a3, int a4)
|
|
156 {
|
517
|
157 printf("#0155:order %d %d %d %d %d\n",a0,a1,a2,a3,a4);
|
516
|
158 }
|
|
159
|
|
160 static
|
|
161 inline int order1(int a0,int a1,int a2, int a3, int a4)
|
|
162 {
|
517
|
163 printf("#0161:orderp %d %d %d %d %d\n",a0,a1,a2,a3,a4);
|
515
|
164 }
|
|
165
|
516
|
166 int (*order1p)(int a0,int a1,int a2, int a3, int a4) = order1;
|
|
167
|
|
168 static inline int inmain(int ac,char *av[])
|
|
169 {
|
|
170 fnp = ins1;
|
|
171 order(11,12,13,14,15);
|
|
172 order1p(11,12,13,14,15);
|
|
173 a0(15,16);
|
|
174 a0(-19,16);
|
|
175 fnp3 = in2;
|
|
176 a1(19,110);
|
|
177 main0(ac,av);
|
|
178 return 0;
|
|
179 }
|
|
180
|
|
181
|
459
|
182 int
|
460
|
183 main(int ac,char *av[])
|
459
|
184 {
|
|
185 fnp = ins1;
|
515
|
186 order(1,2,3,4,5);
|
516
|
187 order1p(1,2,3,4,5);
|
459
|
188 a0(5,6);
|
|
189 a0(-9,6);
|
|
190 fnp3 = in2;
|
|
191 a1(9,10);
|
460
|
192 main0(ac,av);
|
516
|
193 inmain(ac,av);
|
459
|
194 return 0;
|
|
195 }
|
|
196
|
515
|
197
|