aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c96
1 files changed, 0 insertions, 96 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index 094ba50..2ac29f9 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -120,102 +120,6 @@ cplus_expand_expr (exp, target, tmode, modifier)
switch (code)
{
- case AGGR_INIT_EXPR:
- {
- /* Something needs to be initialized, but we didn't know
- where that thing was when building the tree. For example,
- it could be the return value of a function, or a parameter
- to a function which lays down in the stack, or a temporary
- variable which must be passed by reference.
-
- Cleanups are handled in a language-specific way: they
- might be run by the called function (true in GNU C++
- for parameters with cleanups), or they might be
- run by the caller, after the call (true in GNU C++
- for other cleanup needs). */
-
- tree func = TREE_OPERAND (exp, 0);
- tree args = TREE_OPERAND (exp, 1);
- tree type = TREE_TYPE (exp), slot;
- tree call_exp;
- rtx call_target, return_target;
- int pcc_struct_return = 0;
-
- /* The expression `init' wants to initialize what
- `target' represents. SLOT holds the slot for TARGET. */
- slot = TREE_OPERAND (exp, 2);
-
- /* Should always be called with a target. */
- my_friendly_assert (target != NULL_RTX, 205);
-
- /* The target the initializer will initialize (CALL_TARGET)
- must now be directed to initialize the target we are
- supposed to initialize (TARGET). The semantics for
- choosing what CALL_TARGET is is language-specific,
- as is building the call which will perform the
- initialization. It is left here to show the choices that
- exist for C++. */
-
- if (AGGR_INIT_VIA_CTOR_P (exp))
- {
- type = build_pointer_type (type);
- mark_addressable (slot);
- args = tree_cons (NULL_TREE,
- build1 (ADDR_EXPR, type, slot),
- TREE_CHAIN (args));
- call_target = 0;
- }
- else
- {
- call_target = target;
-#ifdef PCC_STATIC_STRUCT_RETURN
- if (aggregate_value_p (type))
- {
- pcc_struct_return = 1;
- call_target = 0;
- }
-#endif
- }
-
- call_exp = build (CALL_EXPR, type, func, args, NULL_TREE);
- TREE_SIDE_EFFECTS (call_exp) = 1;
- return_target = expand_call (call_exp, call_target, ignore);
-
- if (call_target)
- /* Trust that the right thing has been done; it's too hard to
- verify. */
- return return_target;
-
- /* If we're suffering under the ancient PCC_STATIC_STRUCT_RETURN
- calling convention, we need to copy the return value out of
- the static return buffer into slot. */
- if (pcc_struct_return)
- {
- extern int flag_access_control;
- int old_ac = flag_access_control;
-
- tree init = build_decl (VAR_DECL, NULL_TREE,
- build_reference_type (type));
- DECL_RTL (init) = XEXP (return_target, 0);
- init = convert_from_reference (init);
-
- flag_access_control = 0;
- expand_expr (build_aggr_init (slot, init,
- LOOKUP_ONLYCONVERTING),
- target, tmode, EXPAND_NORMAL);
- flag_access_control = old_ac;
-
- if (TYPE_NEEDS_DESTRUCTOR (type))
- {
- init = maybe_build_cleanup (init);
- if (init != NULL_TREE)
- expand_expr (init, const0_rtx, VOIDmode, 0);
- }
- }
-
- return DECL_RTL (slot);
- }
-
case PTRMEM_CST:
return expand_expr (cplus_expand_constant (exp),
target, tmode, modifier);