PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / pr69764.c
blob79623ec7373e8f3295049bb44fe95188692a53a6
1 /* PR rtl-optimization/69764 */
2 /* { dg-do compile { target int32plus } } */
4 unsigned char
5 fn1 (unsigned char a)
7 return a >> ~6; /* { dg-warning "right shift count is negative" } */
10 unsigned short
11 fn2 (unsigned short a)
13 return a >> ~6; /* { dg-warning "right shift count is negative" } */
16 unsigned int
17 fn3 (unsigned int a)
19 return a >> ~6; /* { dg-warning "right shift count is negative" } */
22 unsigned char
23 fn4 (unsigned char a)
25 return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */
28 unsigned short
29 fn5 (unsigned short a)
31 return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */
34 unsigned int
35 fn6 (unsigned int a)
37 return a >> 0xff03; /* { dg-warning "right shift count >= width of type" } */