Require target lra in gcc.dg/pr108095.c
[official-gcc.git] / gcc / testsuite / gcc.dg / builtins-57.c
blob18d40e8f7ffca93008a08c4d3da89a2cb2b21a74
1 /* { dg-do link } */
2 /* { dg-options "-std=c99 -ffinite-math-only -O" } */
4 #include "builtins-config.h"
6 extern void link_error (void);
8 extern double floor (double);
9 extern double trunc (double);
10 extern double fabs (double);
12 void test (double x)
14 #ifdef HAVE_C99_RUNTIME
15 if (floor (fabs (x)) != trunc (fabs (x)))
16 link_error ();
17 #endif
18 if (__builtin_lfloor (fabs (x)) != (long)fabs (x))
19 link_error ();
22 int main (void)
24 return 0;