Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-10.c
blob2d233be7f89baaafe0f99ee8a45a2f51dd0a709a
1 /* Verify straight-line strength reduction for simple integer addition
2 with stride reversed on 1st and 3rd instances. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 int
8 f (int s, int c)
10 int a1, a2, a3, x1, x2, x3, x;
12 a1 = 2 * s;
13 x1 = a1 + c;
14 a2 = 4 * s;
15 x2 = c + a2;
16 a3 = 6 * s;
17 x3 = a3 + c;
18 x = x1 + x2 + x3;
19 return x;
22 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */