aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-isnan-2.c
blob: 32b8833711f9e41e68f67be482a09975b64d4377 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-require-effective-target inf } */
/* { dg-options "-O2 -fdump-tree-optimized" } */

int foo(unsigned int x)
{
  return __builtin_isnan((double)x);
}

int foof(unsigned int x)
{
  return __builtin_isnanf((float)x);
}

int fool(unsigned int x)
{
  return __builtin_isnanl((long double)x);
}

/* { dg-final { scan-tree-dump-times "_isnan" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times " unord " 0 "optimized" } } */