From: Richard Kenner Date: Tue, 12 Oct 1993 19:41:52 +0000 (-0400) Subject: (convert_modes): Reset OLDMODE from X after we strip a SUBREG due to a X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=64791b18b89002e1abd71d9a7d4d37c2f5612ce1;p=gcc.git (convert_modes): Reset OLDMODE from X after we strip a SUBREG due to a promoted variable. From-SVN: r5752 --- diff --git a/gcc/expr.c b/gcc/expr.c index 3a4f6bb2bed..5353fbaddab 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -1183,9 +1183,6 @@ convert_modes (mode, oldmode, x, unsignedp) { register rtx temp; - if (GET_MODE (x) != VOIDmode) - oldmode = GET_MODE (x); - /* If FROM is a SUBREG that indicates that we have already done at least the required extension, strip it. */ @@ -1194,6 +1191,9 @@ convert_modes (mode, oldmode, x, unsignedp) && SUBREG_PROMOTED_UNSIGNED_P (x) == unsignedp) x = gen_lowpart (mode, x); + if (GET_MODE (x) != VOIDmode) + oldmode = GET_MODE (x); + if (mode == oldmode) return x;