(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
pr69764.c
       1  /* PR rtl-optimization/69764 */
       2  /* { dg-do compile { target int32plus } } */
       3  
       4  unsigned char
       5  fn1 (unsigned char a)
       6  {
       7    return a >> ~6;	/* { dg-warning "12:right shift count is negative" } */
       8  }
       9  
      10  unsigned short
      11  fn2 (unsigned short a)
      12  {
      13    return a >> ~6;	/* { dg-warning "12:right shift count is negative" } */
      14  }
      15  
      16  unsigned int
      17  fn3 (unsigned int a)
      18  {
      19    return a >> ~6;	/* { dg-warning "12:right shift count is negative" } */
      20  }
      21  
      22  unsigned char
      23  fn4 (unsigned char a)
      24  {
      25    return a >> 0xff03;	/* { dg-warning "12:right shift count >= width of type" } */
      26  }
      27  
      28  unsigned short
      29  fn5 (unsigned short a)
      30  {
      31    return a >> 0xff03;	/* { dg-warning "12:right shift count >= width of type" } */
      32  }
      33  
      34  unsigned int
      35  fn6 (unsigned int a)
      36  {
      37    return a >> 0xff03;	/* { dg-warning "12:right shift count >= width of type" } */
      38  }