diff options
author | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2001-12-08 10:49:49 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2001-12-08 10:49:49 +0000 |
commit | 9f4524f299d5c40498269b23c4fe32a4058b6ca1 (patch) | |
tree | 0fd986d73d5cc0578ed4e8e81f41b1dab65eee04 | |
parent | da8c84e8df220e3bfb60a750905b2e4a07ef0f1f (diff) | |
download | gcc-9f4524f299d5c40498269b23c4fe32a4058b6ca1.zip gcc-9f4524f299d5c40498269b23c4fe32a4058b6ca1.tar.gz gcc-9f4524f299d5c40498269b23c4fe32a4058b6ca1.tar.bz2 |
final.c (cleanup_subreg_operands): Use recog_data.operand_loc in test for a subreg.
* final.c (cleanup_subreg_operands): Use recog_data.operand_loc
in test for a subreg.
From-SVN: r47788
-rw-r--r-- | gcc/final.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/final.c b/gcc/final.c index 16c95de..a17c3ac 100644 --- a/gcc/final.c +++ b/gcc/final.c @@ -2726,7 +2726,12 @@ cleanup_subreg_operands (insn) extract_insn_cached (insn); for (i = 0; i < recog_data.n_operands; i++) { - if (GET_CODE (recog_data.operand[i]) == SUBREG) + /* The following test cannot use recog_data.operand when tesing + for a SUBREG: the underlying object might have been changed + already if we are inside a match_operator expression that + matches the else clause. Instead we test the underlying + expression directly. */ + if (GET_CODE (*recog_data.operand_loc[i]) == SUBREG) recog_data.operand[i] = alter_subreg (recog_data.operand_loc[i]); else if (GET_CODE (recog_data.operand[i]) == PLUS || GET_CODE (recog_data.operand[i]) == MULT |