]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/builtins-57.c
Move fold_trunc_transparent_mathfn to match.pd
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / builtins-57.c
CommitLineData
877cc28c 1/* { dg-do link } */
67dbe582 2/* { dg-options "-std=c99 -ffinite-math-only -O" } */
e1502f6e 3
877cc28c
RG
4#include "builtins-config.h"
5
6extern void link_error (void);
7
8extern double floor (double);
9extern double trunc (double);
10extern double fabs (double);
11
12void test (double x)
e1502f6e 13{
877cc28c
RG
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 ();
e1502f6e
RG
20}
21
877cc28c 22int main (void)
e1502f6e 23{
877cc28c 24 return 0;
e1502f6e 25}