Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-9.c
blob29cd9f086b5fd10a0118973cf5c87bec7b2ed1e1
1 /* Verify straight-line strength reduction for simple integer addition
2 with stride reversed. */
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 = a2 + c;
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" } } */