+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.
{
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. */
thisblock->data.block.cleanups
= temp_tree_cons (decl_elt, cleanup_elt,
thisblock->data.block.cleanups);
-
- decl_elts = TREE_CHAIN (decl_elts);
}
}
\f