Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / slsr-26.c
blobc333e00bb62cb7a94eab9585df1e0ce2324ff904
1 /* Verify straight-line strength reduction for multiply candidates
2 with variable stride and control flow, increment = -3. */
4 /* { dg-do compile } */
5 /* { dg-options "-O3 -fdump-tree-optimized" } */
7 int
8 f (int n, int x, int stride)
10 int a, x1, x2, x3;
12 a = x * stride;
14 if (n > 64)
16 x1 = x - 3;
17 a += x1 * stride;
18 x2 = x1 - 3;
19 a += x2 * stride;
21 else
23 x3 = x - 3;
24 a += x3 * stride;
27 return a;
30 /* { dg-final { scan-tree-dump-times " \\* stride" 1 "optimized" } } */
31 /* { dg-final { scan-tree-dump-times " \\* 3" 1 "optimized" } } */
32 /* { dg-final { cleanup-tree-dump "optimized" } } */