Debian Codegraph @

gcc/testsuite/gcc.dg/vect/pr93247-1.c

raw
1 /* { dg-do compile } */
2 /* { dg-additional-options "-march=skylake" { target x86_64-*-* i?86-*-* } } */
3
4 typedef struct {
5 unsigned num;
6 } VEC_tree_base;
7
8 enum {
9 LTO_DECL_STREAM_NAMESPACE_DECL,
10 LTO_DECL_STREAM_LABEL_DECL,
11 LTO_N_DECL_STREAMS
12 };
13
14 struct lto_tree_ref_encoder {
15 VEC_tree_base *trees;
16 } typedef *lto_out_decl_state_ptr;
17
18 typedef struct {
19 lto_out_decl_state_ptr vec[1];
20 } VEC_lto_out_decl_state_ptr_base;
21
22 VEC_lto_out_decl_state_ptr_base *a;
23 int f;
24 long g;
25 int
26 fn1(struct lto_tree_ref_encoder *p1) {
27 int i;
28 long b;
29 i = 0;
30 for (; i < LTO_N_DECL_STREAMS; i++) {
31 struct lto_tree_ref_encoder c = *p1;
32 int d;
33 VEC_tree_base *e = c.trees;
34 d = e ? e->num : 0;
35 b += d;
36 }
37 return b;
38 }
39 int
40 fn2() {
41 lto_out_decl_state_ptr h;
42 struct lto_tree_ref_encoder j;
43 unsigned k;
44 for (; k < f; k++) {
45 h = a->vec[k];
46 j = *h;
47 g += fn1(&j);
48 }
49 }