Merge aosp-toolchain/gcc/gcc-4_9 changes.
[official-gcc.git] / gcc-4_9 / gcc / testsuite / gcc.dg / pr64277.c
blobc6ef33119a781615c538f0c02a40cf11e2933b30
1 /* PR tree-optimization/64277 */
2 /* { dg-do compile } */
3 /* { dg-options "-O3 -Wall -Werror -fdump-tree-cunroll-details" } */
4 /* { dg-final { scan-tree-dump "loop with 5 iterations completely unrolled" "cunroll" } } */
5 /* { dg-final { scan-tree-dump "loop with 6 iterations completely unrolled" "cunroll" } } */
6 /* { dg-final { cleanup-tree-dump "cunroll" } } */
8 int f1[10];
9 void test1 (short a[], short m, unsigned short l)
11 int i = l;
12 for (i = i + 5; i < m; i++)
13 f1[i] = a[i]++;
16 void test2 (short a[], short m, short l)
18 int i;
19 if (m > 5)
20 m = 5;
21 for (i = m; i > l; i--)
22 f1[i] = a[i]++;