summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr60351.c
blob: 29184d94872025eb3eabceb790aad141953a42a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
/* PR c/60351 */
/* { dg-do compile } */

void
f (int i)
{
  i >> -1; /* { dg-warning "5:right shift count is negative" } */
  i >> 250; /* { dg-warning "5:right shift count >= width of type" } */
  i << -1; /* { dg-warning "5:left shift count is negative" } */
  i << 250; /* { dg-warning "5:left shift count >= width of type" } */
}