1 /* { dg-do link } */
2 /* { dg-options "-O2 -fdump-tree-vrp1" } */
3
4 #include "vrp.h"
5
test1(int i,int j)6 void test1(int i, int j)
7 {
8 RANGE(i, 1, 5);
9 RANGE(j, 7, 10);
10 CHECK_RANGE(i + j, 8, 15);
11 }
12
13 #define UINT_MAX 2*(unsigned)__INT_MAX__ + 1
test2(unsigned int i)14 void test2(unsigned int i)
15 {
16 RANGE(i, UINT_MAX - 0x4, UINT_MAX - 0x1);
17 CHECK_ANTI_RANGE(i + 0x2, 0x1, UINT_MAX - 0x3);
18 }
test3(unsigned int i)19 void test3(unsigned int i)
20 {
21 RANGE(i, UINT_MAX - 0x4, UINT_MAX - 0x1);
22 CHECK_RANGE(i + 0x5, 0x0, 0x3);
23 }
test4(unsigned int i)24 void test4(unsigned int i)
25 {
26 RANGE(i, 2, 4);
27 CHECK_ANTI_RANGE(i - 4, 1, UINT_MAX - 2);
28 }
test5(unsigned int i)29 void test5(unsigned int i)
30 {
31 RANGE(i, 2, 4);
32 CHECK_RANGE(i - 8, UINT_MAX - 5, UINT_MAX - 3);
33 }
34
main()35 int main() {}
36
37 /* { dg-final { scan-tree-dump-times "link_error" 0 "vrp1" } } */
38