PR middle-end/77357 - strlen of constant strings not folded
[official-gcc.git] / gcc / testsuite / gcc.dg / pr64637.c
blob779ff502dfef4152d370a1c60516ac8f4de59058
1 /* PR c/64637 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wunused" } */
5 void g ();
7 void
8 f (int b)
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 ();
22 b / 5; /* { dg-warning "8:statement with no effect" } */
23 b ^ 5;
24 });