summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gcc/function.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 473fcf30171..b3a599a61a4 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1012,6 +1012,9 @@ fixup_var_refs_insns (var, promoted_mode, unsignedp, insn, toplevel)
if (toplevel
&& GET_CODE (PATTERN (insn)) == SET
&& SET_DEST (PATTERN (insn)) == var
+ /* If this represents the result of an insn group,
+ don't delete the insn. */
+ && find_reg_note (insn, REG_RETVAL, NULL_RTX) == 0
&& rtx_equal_p (SET_SRC (PATTERN (insn)), var))
{
/* In unoptimized compilation, we shouldn't call delete_insn
OpenPOWER on IntegriCloud