2008-05-30 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / tree-ssa / loop-35.c
blobce6ba28d74ab31fb8d4095f50d8b4d094bca3852
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-tree-lim-details" } */
4 int x;
5 int a[100];
7 struct a
9 int X;
10 int Y;
13 struct a arr[100];
15 void test1(int b)
17 unsigned i;
19 /* And here. */
20 for (i = 0; i < 100; i++)
22 arr[b+8].X += i;
23 arr[b+9].X += i;
27 void test2(struct a *A, int b)
29 unsigned i;
31 /* And here as well. */
32 for (i = 0; i < 100; i++)
34 A[b].X += i;
35 A[b+1].Y += i;
39 void test3(unsigned long b)
41 unsigned i;
43 /* And here. */
44 for (i = 0; i < 100; i++)
46 arr[b+8].X += i;
47 arr[b+9].X += i;
51 void test4(struct a *A, unsigned long b)
53 unsigned i;
55 /* And here as well. */
56 for (i = 0; i < 100; i++)
58 A[b].X += i;
59 A[b+1].Y += i;
63 /* { dg-final { scan-tree-dump-times "Executing store motion of" 8 "lim" } } */
64 /* { dg-final { cleanup-tree-dump "lim" } } */