blob: d8833936a2bbbf23bc6c58722be8f705dc21aee7 [file] [log] [blame]
/* { dg-do compile } */
/* { dg-options "-Wshift-count-negative" } */
void foo()
{
unsigned i1 = 1U << -1; /* { dg-warning "left shift count is negative" } */
unsigned i2 = 1U >> -1; /* { dg-warning "right shift count is negative" } */
}