(find_reloads): Don't let an operand have a numbered
authorJim Wilson <wilson@gcc.gnu.org>
Wed, 14 Oct 1992 22:51:59 +0000 (15:51 -0700)
committerJim Wilson <wilson@gcc.gnu.org>
Wed, 14 Oct 1992 22:51:59 +0000 (15:51 -0700)
constraint that makes it match itself.

From-SVN: r2463

gcc/reload.c

index 459939b43cc92c9678c74294f8d2eab4280106ca..befe84ecdeaf8de2e86bdf2aafdae9d5c25ff1a0 100644 (file)
@@ -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)