1 /* { dg-do compile } */
2 /* { dg-options "-Wshift-count-negative" } */
3
4 void foo()
5 {
6 unsigned i1 = 1U << -1; /* { dg-warning "20:left shift count is negative" } */
7 unsigned i2 = 1U >> -1; /* { dg-warning "20:right shift count is negative" } */
8 }