| 1 |
/* This test was causing an ICE in DCE because we were allowing void * |
| 2 |
pointers to have a memory tag, which we were copying when doing copy |
| 3 |
propagation. Since void * can never be de-referenced, its memory tag |
| 4 |
was never renamed. */ |
| 5 |
|
| 6 |
/* { dg-do compile } */ |
| 7 |
/* { dg-options "-O -ftree-dominator-opts -std=gnu89" } */ |
| 8 |
|
| 9 |
typedef __SIZE_TYPE__ size_t; |
| 10 |
typedef union tree_node *tree; |
| 11 |
struct operands_d |
| 12 |
{ |
| 13 |
tree *def_op; |
| 14 |
}; |
| 15 |
|
| 16 |
void |
| 17 |
gt_ggc_mx_operands_d (void *x_p) |
| 18 |
{ |
| 19 |
struct operands_d *const x = (struct operands_d *) x_p; |
| 20 |
if ((*x).def_op != ((void *) 0)) |
| 21 |
{ |
| 22 |
size_t i0; |
| 23 |
do |
| 24 |
{ |
| 25 |
const void *const a__ = ((*x).def_op); |
| 26 |
if (a__ != ((void *) 0) && a__ != (void *) 1) |
| 27 |
ggc_set_mark (a__); |
| 28 |
} |
| 29 |
while (0); |
| 30 |
for (i0 = 0; i0 < (size_t) (1); i0++) |
| 31 |
{ |
| 32 |
do |
| 33 |
{ |
| 34 |
if ((void *) (*x).def_op[i0] != ((void *) 0)) |
| 35 |
gt_ggc_mx_lang_tree_node ((*x).def_op[i0]); |
| 36 |
} |
| 37 |
while (0); |
| 38 |
} |
| 39 |
} |
| 40 |
} |