source: Deliverables/D2.2/8051-memoryspaces-branch/tests/clight/array.Clight.expected @ 1448

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

Import of the Paris's sources.

File size: 7.8 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 array_local(void)
266{
267  int i;
268  int j;
269  int a;
270  int b;
271  int tab[10];
272  c16:
273  tab[0] = 0;
274  c15:
275  tab[1] = 0;
276  c14:
277  tab[2] = 0;
278  c13:
279  tab[3] = 0;
280  c12:
281  tab[4] = 0;
282  c11:
283  tab[5] = 0;
284  c10:
285  tab[6] = 0;
286  c9:
287  tab[7] = 0;
288  c8:
289  tab[8] = 0;
290  c7:
291  tab[9] = 0;
292  c6:
293  tab[0] = 1;
294  c5:
295  tab[1] = 5;
296  c4:
297  a = tab[0];
298  c3:
299  tab[1] = 7;
300  c2:
301  a = tab[1];
302  c1:
303  b = tab[0];
304  c0:
305  return a;
306}
307
308int array_mixte(int *tab1, int a, int b)
309{
310  int tab2[10];
311  c30:
312  tab2[0] = 0;
313  c29:
314  tab2[1] = 0;
315  c28:
316  tab2[2] = 0;
317  c27:
318  tab2[3] = 0;
319  c26:
320  tab2[4] = 0;
321  c25:
322  tab2[5] = 0;
323  c24:
324  tab2[6] = 0;
325  c23:
326  tab2[7] = 0;
327  c22:
328  tab2[8] = 0;
329  c21:
330  tab2[9] = 0;
331  c20:
332  tab2[a] = tab1[b] + 1;
333  c19:
334  tab1[b] = tab2[0];
335  c18:
336  tab1[a] = tab1[1];
337  c17:
338  return tab2[a];
339}
340
341int array_param(int *tab, int c, int d)
342{
343  int i;
344  int j;
345  int a;
346  int b;
347  c37:
348  tab[0] = 1;
349  c36:
350  tab[1] = c;
351  c35:
352  a = tab[0];
353  c34:
354  tab[d] = 7;
355  c33:
356  a = tab[d];
357  c32:
358  b = tab[0];
359  c31:
360  return a;
361}
362
363int main(void)
364{
365  int t[10];
366  int a;
367  int b;
368  int c;
369  c51:
370  t[0] = 1;
371  c50:
372  t[1] = 2;
373  c49:
374  t[2] = 3;
375  c48:
376  t[3] = 4;
377  c47:
378  t[4] = 5;
379  c46:
380  t[5] = 6;
381  c45:
382  t[6] = 7;
383  c44:
384  t[7] = 8;
385  c43:
386  t[8] = 9;
387  c42:
388  t[9] = 0;
389  c41:
390  a = array_local();
391  c40:
392  b = array_mixte(t, 2, 3);
393  c39:
394  c = array_param(t, 2, 3);
395  c38:
396  return (a + b) + c;
397}
398
399
Note: See TracBrowser for help on using the repository browser.