Debian Codegraph @

gcc/testsuite/gcc.c-torture/execute/builtins/uabs-1.c

raw
1 /* Test for -fno-builtin-FUNCTION. */
2 /* Origin: Joseph Myers <[email protected]>. */
3 /* GCC normally handles uabs and ulabs as built-in functions even without
4 optimization. So test that with -fno-builtin-uabs, ulabs is so handled
5 but uabs isn't. */
6
7 int abs_called = 0;
8
9 extern unsigned int uabs (int);
10 extern unsigned long ulabs (long);
11 extern void abort (void);
12
13 void
14 main_test (void)
15 {
16 if (ulabs (0) != 0)
17 abort ();
18 if (uabs (0) != 0)
19 abort ();
20 if (!abs_called)
21 abort ();
22 }