[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / ext / unroll-3.C
blob6516ee97c96f857edcc37645cb5bd5bcda5b691d
1 // { dg-do compile }
2 // { dg-options "-O2 -fdump-tree-cunrolli-details" }
3 // { dg-skip-if "range for" { *-*-* } { "-std=gnu++98" } { "" } }
5 template <typename T>
6 void
7 foo (T (&a)[8], T *b, T *c)
9 #pragma GCC unroll 8
10   for (int i : a)
11     a[i] = b[i] * c[i];
14 void
15 bar (int (&a)[8], int *b, int *c)
17   foo <int> (a, b, c);
20 // { dg-final { scan-tree-dump "note: loop with 8 iterations completely unrolled" "cunrolli" } }