From 1574ef130fb3149f09b3a1b36c65873a6e494582 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Wed, 2 Jan 2002 02:31:58 +0000 Subject: c-common.h (genrtl_expr_stmt_value): Declare. * c-common.h (genrtl_expr_stmt_value): Declare. * c-semantics.c (genrtl_goto_stmt): Redirect to... (genrtl_goto_stmt_value): ... this new function. Pass new argument down to expand_expr_stmt_value, taking TREE_ADDRESSABLE into account. * c-common.c (c_expand_expr): Mark the last EXPR_STMT of a STMT_EXPR as addressable, i.e., one whose result we want. * expr.c (expand_expr): Don't save expression statement value of labeled_blocks or loop_exprs. * stmt.c (expand_expr_stmt): Redirect to... (expand_expr_stmt_value): ... this new function. Use new argument to tell whether to save expression value. (expand_end_stmt_expr): Reset last_expr_type and last_expr_value if we don't have either. * tree-inline.c (declare_return_variable): Mark its use statement as addressable. * tree.h: Document new use of TREE_ADDRESSABLE. (expand_expr_stmt_value): Declare. From-SVN: r48456 --- gcc/expr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gcc/expr.c') diff --git a/gcc/expr.c b/gcc/expr.c index 60c3431..1388b6ff8 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1,6 +1,6 @@ /* Convert tree expression to rtl instructions, for GNU compiler. Copyright (C) 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, - 2000, 2001 Free Software Foundation, Inc. + 2000, 2001, 2002 Free Software Foundation, Inc. This file is part of GCC. @@ -6453,7 +6453,7 @@ expand_expr (exp, target, tmode, modifier) case LABELED_BLOCK_EXPR: if (LABELED_BLOCK_BODY (exp)) - expand_expr_stmt (LABELED_BLOCK_BODY (exp)); + expand_expr_stmt_value (LABELED_BLOCK_BODY (exp), 0); /* Should perhaps use expand_label, but this is simpler and safer. */ do_pending_stack_adjust (); emit_label (label_rtx (LABELED_BLOCK_LABEL (exp))); @@ -6468,7 +6468,7 @@ expand_expr (exp, target, tmode, modifier) case LOOP_EXPR: push_temp_slots (); expand_start_loop (1); - expand_expr_stmt (TREE_OPERAND (exp, 0)); + expand_expr_stmt_value (TREE_OPERAND (exp, 0), 0); expand_end_loop (); pop_temp_slots (); -- cgit v1.1