aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Henderson <rth@cygnus.com>2000-09-19 07:26:38 -0700
committerRichard Henderson <rth@gcc.gnu.org>2000-09-19 07:26:38 -0700
commit39b726dd63141158c64b4a8cde58305040cded0e (patch)
tree1f6ec60c9489e5dac0b625beaa26964db46a282a
parent9790cefdd45a78f21a77f9ff0e7170fe3732b8a5 (diff)
downloadgcc-39b726dd63141158c64b4a8cde58305040cded0e.zip
gcc-39b726dd63141158c64b4a8cde58305040cded0e.tar.gz
gcc-39b726dd63141158c64b4a8cde58305040cded0e.tar.bz2
c-typeck.c (c_expand_asm_operands): Restore the output tree after expanding.
* c-typeck.c (c_expand_asm_operands): Restore the output tree after expanding. From-SVN: r36533
-rw-r--r--gcc/ChangeLog3
-rw-r--r--gcc/c-typeck.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e74d3c7..f6de40a 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,8 @@
2000-09-19 Richard Henderson <rth@cygnus.com>
+ * c-typeck.c (c_expand_asm_operands): Restore the output tree
+ after expanding.
+
* stmt.c (expand_expr_stmt): Only call warn_if_unused_value
if the tree has side effects.
(warn_if_unused_value): Do not warn about void constructs.
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 1461432..da8ced2 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -6603,6 +6603,10 @@ c_expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
expand_expr (build_modify_expr (o[i], NOP_EXPR, TREE_VALUE (tail)),
NULL_RTX, VOIDmode, EXPAND_NORMAL);
free_temp_slots ();
+
+ /* Restore the original value so that it's correct the next
+ time we expand this function. */
+ TREE_VALUE (tail) = o[i];
}
/* Detect modification of read-only values.
(Otherwise done by build_modify_expr.) */