aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1994-07-05 18:27:27 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1994-07-05 18:27:27 -0400
commit3e073e7297d196adc6fdfb97e008ff5df29c7b7e (patch)
treede3b8f6d712e923195ef4b1b4504505e44115456
parente33477bed718cc3c4377204e6ae5f0ddfc73f90e (diff)
downloadgcc-3e073e7297d196adc6fdfb97e008ff5df29c7b7e.zip
gcc-3e073e7297d196adc6fdfb97e008ff5df29c7b7e.tar.gz
gcc-3e073e7297d196adc6fdfb97e008ff5df29c7b7e.tar.bz2
(expand_increment): If pre-incrementing a promoted variable, don't
adjust OP0 since the result won't be used. From-SVN: r7655
-rw-r--r--gcc/expr.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 46be1f3..a2b24c4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8042,7 +8042,12 @@ expand_increment (exp, post)
shared (it was made by the expand_expr call above). */
if (GET_CODE (op0) == SUBREG && SUBREG_PROMOTED_VAR_P (op0))
- SUBREG_REG (op0) = copy_to_reg (SUBREG_REG (op0));
+ {
+ if (post)
+ SUBREG_REG (op0) = copy_to_reg (SUBREG_REG (op0));
+ else
+ bad_subreg = 1;
+ }
else if (GET_CODE (op0) == SUBREG
&& GET_MODE_BITSIZE (GET_MODE (op0)) < BITS_PER_WORD)
{