view gcc/testsuite/gcc.target/i386/pr95169.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line source

/* PR target/95169 */
/* { dg-do run { target ia32 } } */
/* { dg-options "-O0 -march=i386 -mtune=generic" } */
/* { dg-require-effective-target fenv_exceptions } */

#include <fenv.h>

void
f (double y)
{
  if (__builtin_expect (y == 0.0, 0))
    __builtin_abort ();
}

int
main (void)
{
  double y = __builtin_nan ("");

  feclearexcept (FE_INVALID);

  f (y);

  if (fetestexcept (FE_INVALID))
    __builtin_abort ();

  return 0;
}