Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / gcc.c-torture / execute / builtins / lib / abs.c
blob590ded7892b10c71186176e12744be85d0820760
1 extern int inside_main;
2 extern void abort (void);
3 #ifdef __OPTIMIZE__
4 #define ABORT_INSIDE_MAIN do { if (inside_main) abort (); } while (0)
5 #else
6 #define ABORT_INSIDE_MAIN do { } while (0)
7 #endif
9 typedef __INTMAX_TYPE__ intmax_t;
11 int
12 abs (int x)
14 ABORT_INSIDE_MAIN;
15 return x < 0 ? -x : x;
18 long
19 labs (long x)
21 ABORT_INSIDE_MAIN;
22 return x < 0 ? -x : x;
25 long long
26 llabs (long long x)
28 ABORT_INSIDE_MAIN;
29 return x < 0 ? -x : x;
32 intmax_t
33 imaxabs (intmax_t x)
35 ABORT_INSIDE_MAIN;
36 return x < 0 ? -x : x;