Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr63530.c

raw
1 /* { dg-additional-options "-funroll-loops --param \"max-completely-peeled-insns=400\"" } */
2
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" */
7
8 #include "tree-vect.h"
9
10 #include <stdlib.h>
11
12 typedef struct {
13 unsigned char map[256];
14 int i;
15 } A, *AP;
16
17 AP __attribute__ ((noinline))
18 foo (int n)
19 {
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;
25 }
26
27 int
28 main()
29 {
30 AP p = foo(3);
31 check_vect ();
32 return p->map[30] - p->map[20] - p->map[10];
33 }