aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/builtins-57.c
blob: 361826cb00a5b82853659f190bf3624b01e322e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* { dg-do link } */
/* { dg-options "-std=c99 -ffinite-math-only" } */

#include "builtins-config.h"

extern void link_error (void);

extern double floor (double);
extern double trunc (double);
extern double fabs (double);

void test (double x)
{
#ifdef HAVE_C99_RUNTIME
  if (floor (fabs (x)) != trunc (fabs (x)))
    link_error ();
#endif
  if (__builtin_lfloor (fabs (x)) != (long)fabs (x))
    link_error ();
}

int main (void)
{
  return 0;
}