aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorPaolo Bonzini <bonzini@gnu.org>2008-09-09 08:56:58 +0000
committerPaolo Bonzini <bonzini@gcc.gnu.org>2008-09-09 08:56:58 +0000
commit0c03f46fcb7815e5da15a37abbbb8c40daa5cc48 (patch)
tree37848acf141412c81415c91c89ffd7eab8980776 /gcc/stmt.c
parent6efbd94a33a53ac4cb6d3c5585c27f529713b9bb (diff)
downloadgcc-0c03f46fcb7815e5da15a37abbbb8c40daa5cc48.zip
gcc-0c03f46fcb7815e5da15a37abbbb8c40daa5cc48.tar.gz
gcc-0c03f46fcb7815e5da15a37abbbb8c40daa5cc48.tar.bz2
c-common.c (c_expand_decl): Remove.
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. From-SVN: r140138
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 ee88096..199967e 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