From 2ad701bad01f7a0a6ba0ace0c0c33fcacd835d30 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 25 Nov 1992 18:03:49 +0000 Subject: [PATCH] (expand_inline_function): Ensure a REG used as COPY has REG_USERVAR_P set if LOC does. From-SVN: r2796 --- gcc/integrate.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/integrate.c b/gcc/integrate.c index 952a6477ccf..14ce7275323 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1372,10 +1372,17 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add { /* This is the good case where the parameter is in a register. If it is read-only and our argument is a constant, set up the - constant equivalence. */ - if (GET_CODE (copy) != REG && GET_CODE (copy) != SUBREG) + constant equivalence. + + If LOC is REG_USERVAR_P, the usual case, COPY must also have + that flag set if it is a register. */ + + if ((GET_CODE (copy) != REG && GET_CODE (copy) != SUBREG) + || (GET_CODE (copy) == REG && REG_USERVAR_P (loc) + && ! REG_USERVAR_P (copy))) { temp = copy_to_mode_reg (GET_MODE (loc), copy); + REG_USERVAR_P (temp) = REG_USERVAR_P (loc); if (CONSTANT_P (copy) || FIXED_BASE_PLUS_P (copy)) { map->const_equiv_map[REGNO (temp)] = copy; -- 2.30.2