15 for(i
=0;i
<TAB_SIZE
;i
++) {
25 for(i
=0;i
<TAB_SIZE
+ 1;i
++) {
31 /* actually, profiling test */
38 for(it
=0;it
<NB_ITS
;it
++) {
39 for(i
=0;i
<TAB_SIZE
;i
++) {
52 tab4
= malloc(20 * sizeof(int));
67 tab4
= malloc(20 * sizeof(int));
77 /* XXX: currently: bug */
83 tab4
= malloc(20 * sizeof(int));
98 for(i
=0;i
<TAB_SIZE
+ 1;i
++) {
101 printf("i=%d %x\n", i
, p
);
138 memcpy(tab
, tab1
, 10);
139 memmove(tab
, tab1
, 10);
168 memset(tab
, 'a', sizeof(tab
));
174 char *p
= alloca(TAB_SIZE
);
175 memset(p
, 'a', TAB_SIZE
);
183 char *p
= alloca(TAB_SIZE
-1);
184 memset(p
, 'a', TAB_SIZE
);
189 int (*table_test
[])(void) = {
208 int main(int argc
, char **argv
)
214 printf("usage: boundtest n\n"
215 "test TCC bound checking system\n"
222 index
= atoi(argv
[1]);
223 /* well, we also use bounds on this ! */
224 ftest
= table_test
[index
];
231 * without bound 0.77 s