Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-7.c
blob122cd9c4d47749c862b719cf18ca13ca9972c8c5
1 /* Verify straight-line strength reduction for simple integer subtraction. */
3 /* { dg-do compile } */
4 /* { dg-options "-O3 -fdump-tree-optimized" } */
6 int
7 f (int s, int c)
9 int a1, a2, a3, x1, x2, x3, x;
11 a1 = 2 * s;
12 x1 = c - a1;
13 a2 = 4 * s;
14 x2 = c - a2;
15 a3 = 6 * s;
16 x3 = c - a3;
17 x = x1 + x2 + x3;
18 return x;
21 /* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */