stmt.c (expand_anon_union_decl): When any of the elements of the union is addressable, so is the entire union.
* stmt.c (expand_anon_union_decl): When any of the elements of the union is addressable, so is the entire union. From-SVN: r29816
This commit is contained in:
parent
436c94cb55
commit
8a693bd0bb
@ -1,3 +1,8 @@
|
||||
Mon Oct 4 16:22:20 1999 Mark Mitchell <mark@codesourcery.com>
|
||||
|
||||
* stmt.c (expand_anon_union_decl): When any of the elements of the
|
||||
union is addressable, so is the entire union.
|
||||
|
||||
Mon Oct 4 11:38:33 1999 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* sbitmap.c (sbitmap_ones): Don't set too many bits.
|
||||
|
18
gcc/stmt.c
18
gcc/stmt.c
@ -4162,15 +4162,25 @@ expand_anon_union_decl (decl, cleanup, decl_elts)
|
||||
{
|
||||
struct nesting *thisblock = current_function == 0 ? 0 : block_stack;
|
||||
rtx x;
|
||||
tree t;
|
||||
|
||||
/* If any of the elements are addressable, so is the entire union. */
|
||||
for (t = decl_elts; t; t = TREE_CHAIN (t))
|
||||
if (TREE_ADDRESSABLE (TREE_VALUE (t)))
|
||||
{
|
||||
TREE_ADDRESSABLE (decl) = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
expand_decl (decl);
|
||||
expand_decl_cleanup (decl, cleanup);
|
||||
x = DECL_RTL (decl);
|
||||
|
||||
while (decl_elts)
|
||||
/* Go through the elements, assigning RTL to each. */
|
||||
for (t = decl_elts; t; t = TREE_CHAIN (t))
|
||||
{
|
||||
tree decl_elt = TREE_VALUE (decl_elts);
|
||||
tree cleanup_elt = TREE_PURPOSE (decl_elts);
|
||||
tree decl_elt = TREE_VALUE (t);
|
||||
tree cleanup_elt = TREE_PURPOSE (t);
|
||||
enum machine_mode mode = TYPE_MODE (TREE_TYPE (decl_elt));
|
||||
|
||||
/* Propagate the union's alignment to the elements. */
|
||||
@ -4213,8 +4223,6 @@ expand_anon_union_decl (decl, cleanup, decl_elts)
|
||||
thisblock->data.block.cleanups
|
||||
= temp_tree_cons (decl_elt, cleanup_elt,
|
||||
thisblock->data.block.cleanups);
|
||||
|
||||
decl_elts = TREE_CHAIN (decl_elts);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user