PR tree-optimization/84740
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / pr63530.c
blob2def834ff8ec935825bac8f9303195754f488fb0
1 /* { dg-additional-options "-funroll-loops --param \"max-completely-peeled-insns=400\"" } */
3 /* PR tree-optimization/63530 */
4 /* On armv7 hardware, following options cause run time failure */
5 /* -march=armv7-a -mfloat-abi=hard -mfpu=neon -marm -O2 -ftree-vectorize */
6 /* -funroll-loops --param "max-completely-peeled-insns=400" */
8 #include "tree-vect.h"
10 #include <stdlib.h>
12 typedef struct {
13 unsigned char map[256];
14 int i;
15 } A, *AP;
17 AP __attribute__ ((noinline))
18 foo (int n)
20 AP b = (AP)calloc (1, sizeof (A));
21 int i;
22 for (i = n; i < 256; i++)
23 b->map[i] = i;
24 return b;
27 int
28 main()
30 AP p = foo(3);
31 check_vect ();
32 return p->map[30] - p->map[20] - p->map[10];