2 /* { dg-do compile } */
3 /* { dg-options "-Wall -Wextra" } */
5 #define M (sizeof (int) * __CHAR_BIT__)
10 return i
== (-1 << 8); /* { dg-warning "left shift of negative value" } */
16 return i
== (1 << M
); /* { dg-warning "left shift count" } */
22 return i
== 10 << (M
- 1); /* { dg-warning "requires" } */
28 return i
== 1 << -1; /* { dg-warning "left shift count" } */
34 return i
== 1 >> M
; /* { dg-warning "right shift count" } */
40 return i
== 1 >> -1; /* { dg-warning "right shift count" } */