summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-04 15:10:16 +0000
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>2001-12-04 15:10:16 +0000
commit1084d1c7d3a2db70926d0ff69f3815aad14e0782 (patch)
tree2f7f9ab738ee326953f015588c4b564eca6e1b43 /gcc
parentcd8d7ab1ea0700933746fad7035fd76adb91c5a9 (diff)
downloadgcc-1084d1c7d3a2db70926d0ff69f3815aad14e0782.tar.gz
Revert previous patch
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@47612 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/ada/ChangeLog4
-rw-r--r--gcc/ada/trans.c4
-rw-r--r--gcc/c-common.c2
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/semantics.c2
-rw-r--r--gcc/expr.c4
-rw-r--r--gcc/f/ChangeLog5
-rw-r--r--gcc/f/com.c2
-rw-r--r--gcc/stmt.c18
-rw-r--r--gcc/tree.h2
11 files changed, 10 insertions, 48 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 26bed221d40..2ee82900395 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -8,16 +8,6 @@
* tree.c (get_callee_fndecl): Follow DECL_ABSTRACT_ORIGIN if
DECL_INITIAL is NULL.
- * stmt.c (expand_expr_stmt): Keep last_expr_value non-NULL iff
- we're interested in the result. Use it to tell whether to
- ignore results of enclosed expressions.
- (expand_start_stmt_expr): Added new argument, and initialize
- last_expr_value accordingly.
- * tree.h (expand_start_stmt_expr): Adjusted declaration.
- * c-common.c (c_expand_expr): Adjust call.
- * expr.c (expand_expr) [EXPR_WFL]: Pass const0_rtx down if
- ignoring the result.
-
2001-12-04 Jakub Jelinek <jakub@redhat.com>
* flow.c (ior_reg_cond): Return NULL if ! add and rtx wasn't optimized.
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index d2ac167bf07..cf3b44bb4a9 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,7 +1,3 @@
-2001-12-04 Andreas Jaeger <aj@suse.de>
-
- * trans.c (tree_transform): Adjust call of expand_start_stmt_expr.
-
2001-12-03 Robert Dewar <dewar@gnat.com>
* sinfo.ads: Minor reformatting. N_Freeze_Entity node does not
diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c
index 2f3965f09e6..deec9e79a7b 100644
--- a/gcc/ada/trans.c
+++ b/gcc/ada/trans.c
@@ -6,7 +6,7 @@
* *
* C Implementation File *
* *
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
* *
* Copyright (C) 1992-2001, Free Software Foundation, Inc. *
* *
@@ -1797,7 +1797,7 @@ tree_transform (gnat_node)
we need to make sure it gets executed after the LHS. */
gnu_lhs = gnat_to_gnu (Left_Opnd (gnat_node));
clear_last_expr ();
- gnu_rhs_side = expand_start_stmt_expr (1);
+ gnu_rhs_side = expand_start_stmt_expr ();
gnu_rhs = gnat_to_gnu (Right_Opnd (gnat_node));
expand_end_stmt_expr (gnu_rhs_side);
gnu_result_type = get_unpadded_type (Etype (gnat_node));
diff --git a/gcc/c-common.c b/gcc/c-common.c
index 41aaeb6057d..a7d005b04ed 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -3409,7 +3409,7 @@ c_expand_expr (exp, target, tmode, modifier)
out-of-scope after the first EXPR_STMT from within the
STMT_EXPR. */
push_temp_slots ();
- rtl_expr = expand_start_stmt_expr (target != const0_rtx);
+ rtl_expr = expand_start_stmt_expr ();
expand_stmt (STMT_EXPR_STMT (exp));
expand_end_stmt_expr (rtl_expr);
result = expand_expr (rtl_expr, target, tmode, modifier);
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 01ba7883d15..a8118ef9b59 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,8 +1,3 @@
-2001-12-04 Alexandre Oliva <aoliva@redhat.com>
-
- * semantics.c (begin_global_stmt_expr): Adjust
- expand_start_stmt_expr invocation.
-
2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
* pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index aecaca7fa56..2a31da0ef2e 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -1292,7 +1292,7 @@ begin_global_stmt_expr ()
keep_next_level (1);
- return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr(1);
+ return (last_tree != NULL_TREE) ? last_tree : expand_start_stmt_expr();
}
/* Finish the STMT_EXPR last begun with begin_global_stmt_expr. */
diff --git a/gcc/expr.c b/gcc/expr.c
index 1a4681e5b00..659ff032db4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -6528,9 +6528,7 @@ expand_expr (exp, target, tmode, modifier)
if (EXPR_WFL_EMIT_LINE_NOTE (exp))
emit_line_note (input_filename, lineno);
/* Possibly avoid switching back and forth here. */
- to_return = expand_expr (EXPR_WFL_NODE (exp),
- target || ! ignore ? target : const0_rtx,
- tmode, modifier);
+ to_return = expand_expr (EXPR_WFL_NODE (exp), target, tmode, modifier);
input_filename = saved_input_filename;
lineno = saved_lineno;
return to_return;
diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog
index 766ea98dcbf..e9728d336fc 100644
--- a/gcc/f/ChangeLog
+++ b/gcc/f/ChangeLog
@@ -1,8 +1,3 @@
-Tue Dec 4 08:28:42 2001 Alexandre Oliva <aoliva@redhat.com>
-
- * com.c (ffecom_expr_power_integer_): Adjust
- expand_start_stmt_expr() invocation.
-
Mon Dec 3 18:56:04 2001 Neil Booth <neil@daikokuya.demon.co.uk>
* com.c: Remove leading capital from diagnostic messages, as
diff --git a/gcc/f/com.c b/gcc/f/com.c
index 5916be769a2..64aa8ffb389 100644
--- a/gcc/f/com.c
+++ b/gcc/f/com.c
@@ -5584,7 +5584,7 @@ ffecom_expr_power_integer_ (ffebld expr)
basetypeof_l_is_int
= build_int_2 ((TREE_CODE (ltype) == INTEGER_TYPE), 0);
- se = expand_start_stmt_expr (1);
+ se = expand_start_stmt_expr ();
ffecom_start_compstmt ();
diff --git a/gcc/stmt.c b/gcc/stmt.c
index bfac270dd52..2b176bb9e9a 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2149,8 +2149,6 @@ void
expand_expr_stmt (exp)
tree exp;
{
- bool want_value = last_expr_value != NULL_RTX;
-
/* If -W, warn about statements with no side effects,
except for an explicit cast to void (e.g. for assert()), and
except inside a ({...}) where they may be useful. */
@@ -2177,7 +2175,7 @@ expand_expr_stmt (exp)
last_expr_value to get reset. Therefore, we set last_expr_value
and last_expr_type *after* calling expand_expr. */
last_expr_value = expand_expr (exp,
- (want_value && expr_stmts_for_value
+ (expr_stmts_for_value
? NULL_RTX : const0_rtx),
VOIDmode, 0);
last_expr_type = TREE_TYPE (exp);
@@ -2190,7 +2188,7 @@ expand_expr_stmt (exp)
if (TYPE_MODE (TREE_TYPE (exp)) == VOIDmode)
;
else if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode)
- last_expr_value = copy_to_reg (last_expr_value);
+ copy_to_reg (last_expr_value);
else
{
rtx lab = gen_label_rtx ();
@@ -2213,14 +2211,6 @@ expand_expr_stmt (exp)
above. */
free_temp_slots ();
- if (! want_value && last_expr_value)
- {
- protect_from_queue (last_expr_value, 0);
- last_expr_value = NULL_RTX;
- }
- else if (want_value && ! last_expr_value)
- last_expr_value = const0_rtx;
-
emit_queue ();
}
@@ -2346,8 +2336,7 @@ clear_last_expr ()
The caller must save that value and pass it to expand_end_stmt_expr. */
tree
-expand_start_stmt_expr (want_value)
- int want_value;
+expand_start_stmt_expr ()
{
tree t;
@@ -2358,7 +2347,6 @@ expand_start_stmt_expr (want_value)
start_sequence_for_rtl_expr (t);
NO_DEFER_POP;
expr_stmts_for_value++;
- last_expr_value = want_value ? const0_rtx : NULL_RTX;
return t;
}
diff --git a/gcc/tree.h b/gcc/tree.h
index 9492b01e294..859a564b360 100644
--- a/gcc/tree.h
+++ b/gcc/tree.h
@@ -2706,7 +2706,7 @@ extern int type_num_arguments PARAMS ((tree));
extern int in_control_zone_p PARAMS ((void));
extern void expand_fixups PARAMS ((rtx));
-extern tree expand_start_stmt_expr PARAMS ((int));
+extern tree expand_start_stmt_expr PARAMS ((void));
extern tree expand_end_stmt_expr PARAMS ((tree));
extern void expand_expr_stmt PARAMS ((tree));
extern int warn_if_unused_value PARAMS ((tree));