1 /* PR tree-optimization/65170 */ 2 /* { dg-do compile { target int128 } } */ 3 /* { dg-options "-O2 -fdump-tree-vrp1" } */ 4 5 typedef unsigned __int128 T; 6 extern void link_error (void); 7 extern void required_check (void); 8 9 T foo(T b,T c)10foo (T b, T c) 11 { 12 T a; 13 b &= 0xffffffffffffffffULL; 14 c &= 0xffffffffffffffffULL; 15 if (b < 7 || c < 7) 16 return 0; 17 a = b * c; 18 if (a < 49 || a > (((T) 0xfffffffffffffffeULL << 64) | 1)) 19 link_error (); 20 return a; 21 } 22 23 T bar(T b,T c)24bar (T b, T c) 25 { 26 T a; 27 b &= 0xffffffffffffffffULL; 28 c &= 0xffffffffffffffffULL; 29 if (b < 7 || c < 7) 30 return 0; 31 a = b * c; 32 if (a == 49) 33 required_check (); 34 return a; 35 } 36 37 T baz(T b,T c)38baz (T b, T c) 39 { 40 T a; 41 b &= 0xffffffffffffffffULL; 42 c &= 0xffffffffffffffffULL; 43 if (b < 7 || c < 7) 44 return 0; 45 a = b * c; 46 if (a == (((T) 0xfffffffffffffffeULL << 64) | 1)) 47 required_check (); 48 return a; 49 } 50 51 /* { dg-final { scan-tree-dump-not "link_error" "vrp1" } } */ 52 /* { dg-final { scan-tree-dump-times "required_check" 2 "vrp1" } } */ 53