]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr96542.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr96542.c
1 /* { dg-do compile} */
2 /* { dg-options "-O2 -fdump-tree-evrp" } */
3
4
5 unsigned char
6 foo (unsigned int x)
7 {
8 _Bool y = x;
9 return (((unsigned char) ~0) >> y) * 2;
10 }
11
12 unsigned char
13 bar (unsigned int x)
14 {
15 return (((unsigned char) ~0) >> (_Bool) x) * 2;
16 }
17
18 unsigned
19 baz (unsigned int x)
20 {
21 if (x >= 4) return 32;
22 return (-1U >> x) * 16;
23 }
24
25 /* { dg-final { scan-tree-dump-times "254" 2 "evrp" } } */
26 /* { dg-final { scan-tree-dump "= PHI <32.*, 4294967280" "evrp" } } */
27