aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/fold-isfinite-1.c
blob: 2ea0192e863fd681a321834a5945e50bee2f13d9 (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(int x)
{
  return __builtin_finite((double)x);
}

int foof(int x)
{
  return __builtin_finitef((float)x);
}

int fool(int x)
{
  return __builtin_finitel((long double)x);
}

/* { dg-final { scan-tree-dump-times "_finite" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times " u> " 0 "optimized" } } */