]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/testsuite/gcc.dg/pr79972.c
Update copyright years.
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / pr79972.c
1 /* PR tree-optimization/79972 */
2 /* { dg-do compile } */
3 /* { dg-require-effective-target alloca } */
4 /* { dg-options "-Walloca -Wvla-larger-than=10000" } */
5
6 int
7 f (int dim, int *b, int *c)
8 {
9 /* -Wvla-larger-than is only issued with optimization (see PR 100510). */
10 int newcentroid[3][dim];
11 int *a = newcentroid[2];
12 int i, dist = 0;
13 __builtin_memcpy (newcentroid, c, sizeof (newcentroid));
14 for (i = 0; i < dim; i++)
15 dist += (a[i] - b[i]) * (a[i] - b[i]);
16 return dist;
17 }