Fix warning with -Wsign-compare -Wsystem-headers
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-32.c
blobe06a1e4e11506d461be2db232c51bdacf14a5df2
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-lim2-details" } */
4 int x;
5 int a[100];
7 struct a
9 int X;
10 int Y;
13 void bla(void);
15 void test1(void)
17 unsigned i;
19 /* We should perform store motion here. */
20 for (x = 0; x < 100; x++)
21 a[x] = x;
24 void test2(void)
26 unsigned i;
28 /* But not here. */
29 for (x = 0; x < 100; x++)
30 bla ();
33 void test3(struct a *A)
35 unsigned i;
37 /* But we should here (using base + offset analysis). */
38 for (i = 0; i < 100; i++)
40 A[5].X += i;
41 A[5].Y += i;
45 /* { dg-final { scan-tree-dump-times "Executing store motion of" 3 "lim2" } } */