diff options
author | Jim Wilson <wilson@gcc.gnu.org> | 1992-10-14 15:51:59 -0700 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 1992-10-14 15:51:59 -0700 |
commit | ea9c5b9e08517bd7db80141b2efbfb7422ed12a3 (patch) | |
tree | ae5b5ecd6fb0155fa5203ebde48d36e64285fe66 /gcc | |
parent | c0e126010f96e1d795239f2dc6c8e936d8377c50 (diff) | |
download | gcc-ea9c5b9e08517bd7db80141b2efbfb7422ed12a3.zip gcc-ea9c5b9e08517bd7db80141b2efbfb7422ed12a3.tar.gz gcc-ea9c5b9e08517bd7db80141b2efbfb7422ed12a3.tar.bz2 |
(find_reloads): Don't let an operand have a numbered
constraint that makes it match itself.
From-SVN: r2463
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/reload.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/reload.c b/gcc/reload.c index 459939b..befe84e 100644 --- a/gcc/reload.c +++ b/gcc/reload.c @@ -2090,6 +2090,17 @@ find_reloads (insn, replace, ind_levels, live_known, reload_reg_p) c -= '0'; operands_match[c][i] = operands_match_p (recog_operand[c], recog_operand[i]); + + /* An operand may not match itself. */ + if (c == i) + { + if (this_insn_is_asm) + warning_for_asm (this_insn, + "operand %d has constraint %d", i, c); + else + abort (); + } + /* If C can be commuted with C+1, and C might need to match I, then C+1 might also need to match I. */ if (commutative >= 0) |