1 /* { dg-do compile } */ 2 /* { dg-options "-O2 -fdump-tree-vrp1" } */ 3 foo(int * p)4int foo(int *p) 5 { 6 int x = -10; 7 if (p[0]) x++; 8 if (p[1]) x++; 9 if (p[2]) x++; 10 if (p[3]) x++; 11 x <<= 2; 12 return (x > 0); 13 } 14 bar(char c)15int bar(char c) 16 { 17 int i = c << 1; 18 return i > 1000; 19 } 20 21 /* { dg-final { scan-tree-dump-times "return 0;" 2 "vrp1" } } */ 22