repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
* doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
ext
/
unroll-1.C
blob
2d58a6a7b0e7afec6ab657aa321f5557743c123d
1
// { dg-do compile }
2
// { dg-options "-O2 -fdump-tree-cunrolli-details" }
3
4
template <typename T>
5
void
6
foo (T *a, T *b, T *c)
7
{
8
#pragma GCC unroll 8
9
for (int i = 0; i < 8; i++)
10
a[i] = b[i] * c[i];
11
}
12
13
void
14
bar (int *a, int *b, int *c)
15
{
16
foo <int> (a, b, c);
17
}
18
19
// { dg-final { scan-tree-dump "note: loop with 8 iterations completely unrolled" "cunrolli" } }