Debian Codegraph @

gcc/testsuite/gcc.dg/tbaa.c

raw
1 /* { dg-do assemble } */
2 /* { dg-options "-O2 -flto -flto-partition=one -fdump-tree-evrp -std=gnu89" } */
3 /* { dg-require-effective-target lto } */
4
5 typedef struct rtx_def *rtx;
6 typedef struct cselib_val_struct
7 {
8 union
9 {
10 } u;
11 struct elt_loc_list *locs;
12 }
13 cselib_val;
14 struct elt_loc_list
15 {
16 struct elt_loc_list *next;
17 rtx loc;
18 };
19 static int n_useless_values;
20 unchain_one_elt_loc_list (pl)
21 struct elt_loc_list **pl;
22 {
23 struct elt_loc_list *l = *pl;
24 *pl = l->next;
25 }
26
27 discard_useless_locs (x, info)
28 void **x;
29 {
30 cselib_val *v = (cselib_val *) * x;
31 struct elt_loc_list **p = &v->locs;
32 int had_locs = v->locs != 0;
33 while (*p)
34 {
35 unchain_one_elt_loc_list (p);
36 p = &(*p)->next;
37 }
38 if (had_locs && v->locs == 0)
39 {
40 n_useless_values++;
41 }
42 }
43 /* { dg-final { scan-tree-dump-times "n_useless_values" 2 "evrp" { xfail *-*-* } } } */