Debian Codegraph @

gcc/testsuite/gcc.dg/tree-ssa/range-isnormal.c

raw
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_MIN__ && !__builtin_isnormal (x))
10 link_error ();
11
12 if (x < -__DBL_MIN__ && x > -__DBL_MAX__ && !__builtin_isnormal (x))
13 link_error ();
14 }
15
16 void test2 (float x)
17 {
18 if (x < __FLT_MAX__ && x > __FLT_MIN__ && !__builtin_isnormal (x))
19 link_error ();
20
21 if (x < -__FLT_MIN__ && x > - __FLT_MAX__ && !__builtin_isnormal (x))
22 link_error ();
23 }
24
25 void test3 (double x)
26 {
27 if (__builtin_isnormal (x) && __builtin_isinf (x))
28 link_error ();
29 }
30
31 void test4 (float x)
32 {
33 if (__builtin_isnormal (x) && __builtin_isinf (x))
34 link_error ();
35 }
36
37 /* { dg-final { scan-tree-dump-not "link_error" "evrp" } } */