From 5cd76fcd7f0db9c993fcbd14c1b4b3f4204fc497 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Fri, 29 May 1992 20:23:11 +0000 Subject: [PATCH] *** empty log message *** From-SVN: r1126 --- gcc/integrate.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/gcc/integrate.c b/gcc/integrate.c index fae93a1a394..243f56d5aa7 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1464,9 +1464,20 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add && GET_CODE (pattern) == SET && GET_CODE (SET_DEST (pattern)) == REG && REG_FUNCTION_VALUE_P (SET_DEST (pattern))) - break; - - copy = emit_insn (copy_rtx_and_substitute (pattern, map)); + { + if (volatile_refs_p (SET_SRC (pattern))) + { + /* If we must not delete the source, + load it into a new temporary. */ + copy = emit_insn (copy_rtx_and_substitute (pattern, map)); + SET_DEST (pattern) + = gen_reg_rtx (GET_MODE (SET_DEST (pattern))); + } + else + break; + } + else + copy = emit_insn (copy_rtx_and_substitute (pattern, map)); /* REG_NOTES will be copied later. */ #ifdef HAVE_cc0 -- 2.30.2