UBSAN: Undefined behaviour in tst-sprofil.c:140:6 unsigned integer overflow:
2432902008176640000 +
7812407968270641256 cannot be represened in type 'long int'
Use unsigned types for the fibonacci.
unsigned int blong[1][0x1000 / sizeof (int)];
unsigned int vlong[1][0x2000 / sizeof (int)];
-static long int
-fac (long int n)
+static long unsigned int
+fac (long int unsigned n)
{
if (n == 0)
return 1;
struct timeval tv, start;
struct prof prof[32];
double t_tick, delta;
- long int sum = 0;
+ long int unsigned sum = 0;
int i, j;
for (i = 0; i < NELEMS (taddr); ++i)