| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -fdump-tree-evrp" } */ |
| 3 |
|
| 4 |
#include <math.h> |
| 5 |
void link_error(); |
| 6 |
|
| 7 |
void test1 (double x) |
| 8 |
{ |
| 9 |
if (x < __DBL_MAX__ && x > -__DBL_MAX__ && !__builtin_isfinite (x)) |
| 10 |
link_error (); |
| 11 |
} |
| 12 |
|
| 13 |
void test2 (float x) |
| 14 |
{ |
| 15 |
if (x < __FLT_MAX__ && x > -__FLT_MAX__ && !__builtin_isfinite (x)) |
| 16 |
link_error (); |
| 17 |
} |
| 18 |
|
| 19 |
void test3 (double x) |
| 20 |
{ |
| 21 |
if (__builtin_isfinite (x) && __builtin_isinf (x)) |
| 22 |
link_error (); |
| 23 |
} |
| 24 |
|
| 25 |
void test4 (float x) |
| 26 |
{ |
| 27 |
if (__builtin_isfinite (x) && __builtin_isinf (x)) |
| 28 |
link_error (); |
| 29 |
} |
| 30 |
|
| 31 |
/* { dg-final { scan-tree-dump-not "link_error" "evrp" } } */ |