Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/unroll-2.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children | 84e7813d76e9 |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O2 -fdump-tree-cunrolli-details=stderr -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fenable-tree-cunrolli" } */ | |
3 | |
4 /* Blank lines can occur in the output of | |
5 -fdump-tree-cunrolli-details=stderr. */ | |
6 /* { dg-allow-blank-lines-in-output 1 } */ | |
7 | |
8 unsigned a[100], b[100]; | |
9 inline void bar() | |
10 { | |
11 a[10] = b[10]; | |
12 } | |
13 | |
14 int foo(void) | |
15 { | |
16 int i; | |
17 bar(); | |
18 for (i = 0; i < 2; i++) /* { dg-message "note: loop with 3 iterations completely unrolled" } */ | |
19 { | |
20 a[i]= b[i] + 1; | |
21 } | |
22 return 1; | |
23 } | |
24 | |
25 int foo2(void) | |
26 { | |
27 int i; | |
28 for (i = 0; i < 2; i++) /* { dg-message "note: loop with 3 iterations completely unrolled" } */ | |
29 { | |
30 a[i]= b[i] + 1; | |
31 } | |
32 return 1; | |
33 } | |
34 /* { dg-prune-output ".*" } */ |