PR tree-optimization/86401
[official-gcc.git] / gcc / testsuite / c-c++-common / Wshift-count-negative-1.c
blobd8833936a2bbbf23bc6c58722be8f705dc21aee7
1 /* { dg-do compile } */
2 /* { dg-options "-Wshift-count-negative" } */
4 void foo()
6 unsigned i1 = 1U << -1; /* { dg-warning "left shift count is negative" } */
7 unsigned i2 = 1U >> -1; /* { dg-warning "right shift count is negative" } */