]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR other/58712 (issues found by --enable-checking=valgrind)
authorVladimir Makarov <vmakarov@redhat.com>
Tue, 12 Nov 2013 21:33:06 +0000 (21:33 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Tue, 12 Nov 2013 21:33:06 +0000 (21:33 +0000)
2013-11-12  Vladimir Makarov  <vmakarov@redhat.com>

PR other/58712
* ira-costs.c (record_operand_costs): Check operands number for
the single set.

From-SVN: r204720

gcc/ChangeLog
gcc/ira-costs.c

index 97ad345b2c35e3ffb8c783051e7c3cf887663a6d..fd9ca26062a2cade28c22b6557cf81aef3263aaa 100644 (file)
@@ -1,3 +1,9 @@
+2013-11-12  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR other/58712
+       * ira-costs.c (record_operand_costs): Check operands number for
+       the single set.
+
 2013-11-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
 
        PR target/59054
index 424b99c2c53784a4c04e3de63fcbda1d5a48971e..d7299e658d713e87b41c65b68fd32ba555b46292 100644 (file)
@@ -1224,6 +1224,9 @@ record_operand_costs (rtx insn, enum reg_class *pref)
      preferred class is very expensive as the source of a copy
      instruction.  */
   if ((set = single_set (insn)) != NULL_RTX
+      /* In rare cases the single set insn might have less 2 operands
+        as the source can be a fixed special reg.  */
+      && recog_data.n_operands > 1
       && ops[0] == SET_DEST (set) && ops[1] == SET_SRC (set))
     {
       int regno, other_regno;