view gcc/testsuite/gcc.dg/builtins-57.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line source

/* { dg-do link } */
/* { dg-options "-std=c99 -ffinite-math-only -O" } */

#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;
}