diff options
author | Richard Henderson <rth@redhat.com> | 2005-08-31 18:06:45 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2005-08-31 18:06:45 -0700 |
commit | 0fd662ee04b37a665ad95d619a7e47185f079183 (patch) | |
tree | 5a966fde14dee2a816ab071f4c98ff3e3247bf68 /gcc/expr.c | |
parent | 1738bfd97d2995e2ec8ebd02efb7749a9b2223be (diff) | |
download | gcc-0fd662ee04b37a665ad95d619a7e47185f079183.zip gcc-0fd662ee04b37a665ad95d619a7e47185f079183.tar.gz gcc-0fd662ee04b37a665ad95d619a7e47185f079183.tar.bz2 |
expr.c (expand_expr_real_1): Force subregs into a pseudo before applying gen_lowpart.
* expr.c (expand_expr_real_1) <VIEW_CONVERT_EXPR>: Force subregs
into a pseudo before applying gen_lowpart.
From-SVN: r103712
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -7544,7 +7544,11 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, else if (TYPE_MODE (type) != BLKmode && GET_MODE (op0) != BLKmode && GET_MODE_SIZE (TYPE_MODE (type)) == GET_MODE_SIZE (GET_MODE (op0))) - op0 = gen_lowpart (TYPE_MODE (type), op0); + { + if (GET_CODE (op0) == SUBREG) + op0 = force_reg (GET_MODE (op0), op0); + op0 = gen_lowpart (TYPE_MODE (type), op0); + } /* If both modes are integral, then we can convert from one to the other. */ else if (SCALAR_INT_MODE_P (GET_MODE (op0)) |