From 826d1afd58c2e064a9c8fdb09eda1b08469de1a8 Mon Sep 17 00:00:00 2001 From: pommicket Date: Fri, 18 Feb 2022 12:36:57 -0500 Subject: newer version of tcc almost working --- 05/tcc-0.9.27/tests/boundtest.c | 285 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 285 insertions(+) create mode 100644 05/tcc-0.9.27/tests/boundtest.c (limited to '05/tcc-0.9.27/tests/boundtest.c') diff --git a/05/tcc-0.9.27/tests/boundtest.c b/05/tcc-0.9.27/tests/boundtest.c new file mode 100644 index 0000000..15bffb4 --- /dev/null +++ b/05/tcc-0.9.27/tests/boundtest.c @@ -0,0 +1,285 @@ +#include +#include +#include + +#define NB_ITS 1000000 +//#define NB_ITS 1 +#define TAB_SIZE 100 + +int tab[TAB_SIZE]; +int ret_sum; +char tab3[256]; + +int test1(void) +{ + int i, sum = 0; + for(i=0;i= 2) + index = atoi(argv[1]) - 1; + + if ((index < 0) || (index >= index_max)) { + printf("N is outside of the valid range (%d)\n", index); + exit(2); + } + + /* well, we also use bounds on this ! */ + ftest = table_test[index]; + ftest(); + + return 0; +} + +/* + * without bound 0.77 s + * with bounds 4.73 + */ -- cgit v1.2.3