(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
pr64637.c
       1  /* PR c/64637 */
       2  /* { dg-do compile } */
       3  /* { dg-options "-Wunused" } */
       4  
       5  void g ();
       6  
       7  void
       8  f (int b)
       9  {
      10    for (int i = 0; i < b; i + b) /* { dg-warning "28:statement with no effect" } */
      11      g ();
      12    // PARM_DECLs still don't have a location, don't expect an exact location.
      13    for (int i = 0; i < b; b) /* { dg-warning "statement with no effect" } */
      14      g ();
      15    for (int i = 0; i < b; !i) /* { dg-warning "26:statement with no effect" } */
      16      g ();
      17    for (!b;;) /* { dg-warning "8:statement with no effect" } */
      18      g ();
      19    for (;; b * 2) /* { dg-warning "13:statement with no effect" } */
      20      g ();
      21    ({
      22       b / 5; /* { dg-warning "8:statement with no effect" } */
      23       b ^ 5;
      24     });
      25  }