| 1 |
/* { dg-do compile } */ |
| 2 |
/* Diagnose vector ops that are later decomposed. */ |
| 3 |
/* { dg-additional-options "-Wvector-operation-performance" } */ |
| 4 |
|
| 5 |
unsigned short foo (unsigned short *a, int n) |
| 6 |
{ |
| 7 |
unsigned short sum = 0; |
| 8 |
for (int i = 0; i < n; ++i) |
| 9 |
sum += a[i]; |
| 10 |
return sum; |
| 11 |
} |