Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr116125.c

raw
1 #include "tree-vect.h"
2
3 struct st
4 {
5 unsigned int num : 8;
6 };
7
8 void __attribute__((noipa))
9 mem_overlap (struct st *a, struct st *b)
10 {
11 for (int i = 0; i < 9; i++)
12 a[i].num = b[i].num + 1;
13 }
14
15 int
16 main (void)
17 {
18 check_vect ();
19
20 struct st a[10] = {};
21
22 // input a = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
23 mem_overlap (&a[1], a);
24
25 // output a = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
26 if (a[2].num == 2)
27 return 0;
28 else
29 __builtin_abort ();
30 }