summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-09 08:56:58 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-09 08:56:58 +0000
commitaaa76ff28925caba3b152379980ca2d60fe8ee74 (patch)
tree37848acf141412c81415c91c89ffd7eab8980776 /gcc/stmt.c
parent6198329e95014582d0ff9e3e1c06da4539208093 (diff)
downloadgcc-aaa76ff28925caba3b152379980ca2d60fe8ee74.tar.gz
2008-09-09 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (c_expand_decl): Remove. * c-common.h (anon_aggr_type_p): Remove prototype. (DECL_ANON_UNION_ELEMS): Remove. * c-objc-common.h (LANG_HOOKS_EXPAND_DECL): Remove. * c-decl.c (anon_aggr_type_p): Remove. * langhooks-def.h (LANG_HOOKS_EXPAND_DECL): Remove. (LANG_HOOKS_INITIALIZER): Remove LANG_HOOKS_EXPAND_DECL. * langhooks.h (struct lang_hooks): Remove expand_decl. * langhooks.c (lhd_expand_decl): Remove. * stmt.c (expand_anon_union_decl): Remove. * tree.h (expand_anon_union_decl): Remove prototype. cp: 2008-09-09 Paolo Bonzini <bonzini@gnu.org> * cp-objcp-common.h (LANG_HOOKS_EXPAND_DECL): Remove. * cp-tree.h: Don't mention DECL_ANON_UNION_ELEMS. * semantics.c (anon_aggr_type_p): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140138 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c60
1 files changed, 0 insertions, 60 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index ee880964fe1..199967e1062 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1958,66 +1958,6 @@ expand_stack_restore (tree var)
emit_stack_restore (SAVE_BLOCK, sa, NULL_RTX);
}
-/* DECL is an anonymous union. CLEANUP is a cleanup for DECL.
- DECL_ELTS is the list of elements that belong to DECL's type.
- In each, the TREE_VALUE is a VAR_DECL, and the TREE_PURPOSE a cleanup. */
-
-void
-expand_anon_union_decl (tree decl, tree cleanup ATTRIBUTE_UNUSED,
- tree decl_elts)
-{
- 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);
- x = DECL_RTL (decl);
-
- /* Go through the elements, assigning RTL to each. */
- for (t = decl_elts; t; t = TREE_CHAIN (t))
- {
- tree decl_elt = TREE_VALUE (t);
- enum machine_mode mode = TYPE_MODE (TREE_TYPE (decl_elt));
- rtx decl_rtl;
-
- /* If any of the elements are addressable, so is the entire
- union. */
- if (TREE_USED (decl_elt))
- TREE_USED (decl) = 1;
-
- /* Propagate the union's alignment to the elements. */
- DECL_ALIGN (decl_elt) = DECL_ALIGN (decl);
- DECL_USER_ALIGN (decl_elt) = DECL_USER_ALIGN (decl);
-
- /* If the element has BLKmode and the union doesn't, the union is
- aligned such that the element doesn't need to have BLKmode, so
- change the element's mode to the appropriate one for its size. */
- if (mode == BLKmode && DECL_MODE (decl) != BLKmode)
- DECL_MODE (decl_elt) = mode
- = mode_for_size_tree (DECL_SIZE (decl_elt), MODE_INT, 1);
-
- if (mode == GET_MODE (x))
- decl_rtl = x;
- else if (MEM_P (x))
- /* (SUBREG (MEM ...)) at RTL generation time is invalid, so we
- instead create a new MEM rtx with the proper mode. */
- decl_rtl = adjust_address_nv (x, mode, 0);
- else
- {
- gcc_assert (REG_P (x));
- decl_rtl = gen_lowpart_SUBREG (mode, x);
- }
- SET_DECL_RTL (decl_elt, decl_rtl);
- }
-}
-
/* Do the insertion of a case label into case_list. The labels are
fed to us in descending order from the sorted vector of case labels used
in the tree part of the middle end. So the list we construct is