source: Deliverables/D2.3/8051/tests/clight/for.Clight.expected @ 453

Last change on this file since 453 was 453, checked in by ayache, 10 years ago

Import of the Paris's sources.

File size: 9.5 KB
Line 
1extern void *__builtin___memcpy_chk(void *, void *, unsigned int, unsigned int);
2
3extern void *__builtin___memmove_chk(void *, void *, unsigned int, unsigned int);
4
5extern void *__builtin___mempcpy_chk(void *, void *, unsigned int, unsigned int);
6
7extern void *__builtin___memset_chk(void *, int, unsigned int, unsigned int);
8
9extern unsigned char *__builtin___stpcpy_chk(unsigned char *, unsigned char *, unsigned int);
10
11extern unsigned char *__builtin___strcat_chk(unsigned char *, unsigned char *, unsigned int);
12
13extern unsigned char *__builtin___strcpy_chk(unsigned char *, unsigned char *, unsigned int);
14
15extern unsigned char *__builtin___strncat_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
16
17extern unsigned char *__builtin___strncpy_chk(unsigned char *, unsigned char *, unsigned int, unsigned int);
18
19extern int __builtin___vfprintf_chk(void *, int, unsigned char *, void *);
20
21extern int __builtin___vprintf_chk(int, unsigned char *, void *);
22
23extern int __builtin___vsnprintf_chk(unsigned char *, unsigned int, int, unsigned int, unsigned char *, void *);
24
25extern int __builtin___vsprintf_chk(unsigned char *, int, unsigned int, unsigned char *, void *);
26
27extern double __builtin_acos(double);
28
29extern float __builtin_acosf(float);
30
31extern double __builtin_acosl(double);
32
33extern void *__builtin_alloca(unsigned int);
34
35extern double __builtin_asin(double);
36
37extern float __builtin_asinf(float);
38
39extern double __builtin_asinl(double);
40
41extern double __builtin_atan(double);
42
43extern float __builtin_atanf(float);
44
45extern double __builtin_atanl(double);
46
47extern double __builtin_atan2(double, double);
48
49extern float __builtin_atan2f(float, float);
50
51extern double __builtin_atan2l(double, double);
52
53extern double __builtin_ceil(double);
54
55extern float __builtin_ceilf(float);
56
57extern double __builtin_ceill(double);
58
59extern double __builtin_cos(double);
60
61extern float __builtin_cosf(float);
62
63extern double __builtin_cosl(double);
64
65extern double __builtin_cosh(double);
66
67extern float __builtin_coshf(float);
68
69extern double __builtin_coshl(double);
70
71extern int __builtin_clz(unsigned int);
72
73extern int __builtin_clzl(unsigned int);
74
75extern int __builtin_clzll(unsigned int);
76
77extern int __builtin_constant_p(int);
78
79extern int __builtin_ctz(unsigned int);
80
81extern int __builtin_ctzl(unsigned int);
82
83extern int __builtin_ctzll(unsigned int);
84
85extern double __builtin_exp(double);
86
87extern float __builtin_expf(float);
88
89extern double __builtin_expl(double);
90
91extern int __builtin_expect(int, int);
92
93extern double __builtin_fabs(double);
94
95extern float __builtin_fabsf(float);
96
97extern double __builtin_fabsl(double);
98
99extern int __builtin_ffs(unsigned int);
100
101extern int __builtin_ffsl(unsigned int);
102
103extern int __builtin_ffsll(unsigned int);
104
105extern void *__builtin_frame_address(unsigned int);
106
107extern double __builtin_floor(double);
108
109extern float __builtin_floorf(float);
110
111extern double __builtin_floorl(double);
112
113extern double __builtin_huge_val(void);
114
115extern float __builtin_huge_valf(void);
116
117extern double __builtin_huge_vall(void);
118
119extern double __builtin_inf(void);
120
121extern float __builtin_inff(void);
122
123extern double __builtin_infl(void);
124
125extern void *__builtin_memcpy(void *, void *, unsigned int);
126
127extern void *__builtin_mempcpy(void *, void *, unsigned int);
128
129extern double __builtin_fmod(double);
130
131extern float __builtin_fmodf(float);
132
133extern double __builtin_fmodl(double);
134
135extern double __builtin_frexp(double, int *);
136
137extern float __builtin_frexpf(float, int *);
138
139extern double __builtin_frexpl(double, int *);
140
141extern double __builtin_ldexp(double, int);
142
143extern float __builtin_ldexpf(float, int);
144
145extern double __builtin_ldexpl(double, int);
146
147extern double __builtin_log(double);
148
149extern float __builtin_logf(float);
150
151extern double __builtin_logl(double);
152
153extern double __builtin_log10(double);
154
155extern float __builtin_log10f(float);
156
157extern double __builtin_log10l(double);
158
159extern float __builtin_modff(float, float *);
160
161extern double __builtin_modfl(double, double *);
162
163extern double __builtin_nan(unsigned char *);
164
165extern float __builtin_nanf(unsigned char *);
166
167extern double __builtin_nanl(unsigned char *);
168
169extern double __builtin_nans(unsigned char *);
170
171extern float __builtin_nansf(unsigned char *);
172
173extern double __builtin_nansl(unsigned char *);
174
175extern void *__builtin_next_arg(void);
176
177extern unsigned int __builtin_object_size(void *, int);
178
179extern int __builtin_parity(unsigned int);
180
181extern int __builtin_parityl(unsigned int);
182
183extern int __builtin_parityll(unsigned int);
184
185extern int __builtin_popcount(unsigned int);
186
187extern int __builtin_popcountl(unsigned int);
188
189extern int __builtin_popcountll(unsigned int);
190
191extern double __builtin_powi(double, int);
192
193extern float __builtin_powif(float, int);
194
195extern double __builtin_powil(double, int);
196
197extern void __builtin_return(void *);
198
199extern void *__builtin_return_address(unsigned int);
200
201extern double __builtin_sin(double);
202
203extern float __builtin_sinf(float);
204
205extern double __builtin_sinl(double);
206
207extern double __builtin_sinh(double);
208
209extern float __builtin_sinhf(float);
210
211extern double __builtin_sinhl(double);
212
213extern double __builtin_sqrt(double);
214
215extern float __builtin_sqrtf(float);
216
217extern double __builtin_sqrtl(double);
218
219extern unsigned char *__builtin_stpcpy(unsigned char *, unsigned char *);
220
221extern unsigned char *__builtin_strchr(unsigned char *, unsigned char);
222
223extern int __builtin_strcmp(unsigned char *, unsigned char *);
224
225extern unsigned char *__builtin_strcpy(unsigned char *, unsigned char *);
226
227extern unsigned int __builtin_strcspn(unsigned char *, unsigned char *);
228
229extern unsigned char *__builtin_strncat(unsigned char *, unsigned char *, unsigned int);
230
231extern int __builtin_strncmp(unsigned char *, unsigned char *, unsigned int);
232
233extern unsigned char *__builtin_strncpy(unsigned char *, unsigned char *, unsigned int);
234
235extern int __builtin_strspn(unsigned char *, unsigned char *);
236
237extern unsigned char *__builtin_strpbrk(unsigned char *, unsigned char *);
238
239extern int __builtin_types_compatible_p(unsigned int, unsigned int);
240
241extern double __builtin_tan(double);
242
243extern float __builtin_tanf(float);
244
245extern double __builtin_tanl(double);
246
247extern double __builtin_tanh(double);
248
249extern float __builtin_tanhf(float);
250
251extern double __builtin_tanhl(double);
252
253extern void __builtin_va_end(void *);
254
255extern void __builtin_varargs_start(void *);
256
257extern void __builtin_va_start(void *, void *);
258
259extern void __builtin_stdarg_start(void *);
260
261extern void __builtin_va_arg(void *, unsigned int);
262
263extern void __builtin_va_copy(void *, void *);
264
265int for_2(int a, int b)
266{
267  int i;
268  int min;
269  int max;
270  int pas;
271  int resul;
272  c9:
273  resul = 0;
274  c8:
275  min = a * 2;
276  c7:
277  max = a * 4;
278  c6:
279  pas = b + 1;
280  c5:
281  for (({ c4: i = min; }); (/* c3 */ i < max); ({ c2: i = i + pas; })) {
282    c1:
283    resul = resul + i;
284  }
285  c0:
286  return resul + 1;
287}
288
289int for_loopParalAsync(int a, int b, int c)
290{
291  int i;
292  int j;
293  int x;
294  int y;
295  int z;
296  c29:
297  x = 0;
298  c28:
299  a = 0;
300  c27:
301  a = a + 3;
302  c26:
303  a = a * 2;
304  c25:
305  a = a / 3;
306  c24:
307  a = a + 8;
308  c23:
309  for (({ c22: i = 0; }); (/* c21 */ i < 20); ({ c20: i = i + 1; })) {
310    c19:
311    x = x + 1;
312    c18:
313    b = b + 2;
314    c17:
315    y = b / x;
316  }
317  c16:
318  for (({ c15: j = 1; }); (/* c14 */ j < a); ({ c13: j = j + 1; })) {
319    c12:
320    c = c * 2;
321    c11:
322    z = c / j;
323  }
324  c10:
325  return x;
326}
327
328int for_double(int pas)
329{
330  int i;
331  int j;
332  int result;
333  int a;
334  int b;
335  c43:
336  a = 0;
337  c42:
338  b = 0;
339  c41:
340  for (({ c40: i = 0; }); (/* c39 */ i < 12); ({ c38: i = i + pas; })) {
341    c37:
342    a = a + i;
343  }
344  c36:
345  for (({ c35: j = 0; }); (/* c34 */ j < 5); ({ c33: j = j + pas; })) {
346    c32:
347    b = b + j;
348  }
349  c31:
350  result = a * b;
351  c30:
352  return result;
353}
354
355int for_ex(int b, int e, int pas)
356{
357  int i;
358  int res;
359  c50:
360  res = 0;
361  c49:
362  for (({ c48:
363       i = b + 3; });
364       (/* c47 */
365       i <= e * 2);
366       ({ c46:
367       i = i + pas; })) {
368    c45:
369    res = res - i;
370  }
371  c44:
372  return res;
373}
374
375int for_fortSimple(int a, int b, int pas)
376{
377  int res;
378  int i;
379  int sortie;
380  int c;
381  c58:
382  res = 0;
383  c57:
384  for (({ c56: i = a; }); (/* c55 */ i < b); ({ c54: i = i + pas; })) {
385    c53:
386    res = res + i;
387  }
388  c52:
389  sortie = res + a;
390  c51:
391  return sortie;
392}
393
394int for_imbriq(int pas1, int pas2)
395{
396  int i;
397  int j;
398  int a;
399  int b;
400  c71:
401  a = 0;
402  c70:
403  for (({ c69: i = 0; }); (/* c68 */ i < 23); ({ c67: i = i + pas1; })) {
404    c66:
405    b = 0;
406    c65:
407    for (({ c64: j = 1; }); (/* c63 */ j < 12); ({ c62: j = j + pas2; })) {
408      c61:
409      a = a + b;
410      c60:
411      b = b % j;
412    }
413  }
414  c59:
415  return a;
416}
417
418int for_incr(int b, int e)
419{
420  int i;
421  int res;
422  c78:
423  res = 0;
424  c77:
425  for (({ c76:
426       i = b + 3; });
427       (/* c75 */
428       i <= e * 2);
429       ({ c74:
430       i = i + 1; })) {
431    c73:
432    res = res - i;
433  }
434  c72:
435  return res;
436}
437
438int for_incrParam(int a, int b)
439{
440  int i;
441  int z;
442  int c;
443  c86:
444  z = a + b;
445  c85:
446  c = 3 * z;
447  c84:
448  for (({ c83: i = z - 4; }); (/* c82 */ i < b + 6); ({ c81: i = i + a; })) {
449    c80:
450    i = (i + z) + a;
451  }
452  c79:
453  return i;
454}
455
456int for_forfor(void)
457{
458  int i;
459  int j;
460  c94:
461  for (({ c93:
462       i = 0; }), ({ c92:
463       j = 0; });
464       (/* c91 */
465       i < 10);
466       ({ c90:
467       i = i + 1; })) {
468    c89:
469    j = j + 1;
470    c88:
471    j = j + 1;
472  }
473  c87:
474  return j;
475}
476
477int main(void)
478{
479  int a;
480  c104:
481  a = for_2(3, 1);
482  c103:
483  a = for_loopParalAsync(1, 2, 3);
484  c102:
485  a = for_double(1);
486  c101:
487  a = for_ex(2, 10, 1);
488  c100:
489  a = for_fortSimple(2, 10, 1);
490  c99:
491  a = for_imbriq(2, 3);
492  c98:
493  a = for_incr(2, 3);
494  c97:
495  a = for_incrParam(2, 3);
496  c96:
497  a = for_forfor();
498  c95:
499  return a;
500}
501
502
Note: See TracBrowser for help on using the repository browser.