re PR rtl-optimization/79541 (lra reads uninitialized memory (with invalid input))
authorVladimir Makarov <vmakarov@redhat.com>
Fri, 17 Feb 2017 16:10:59 +0000 (16:10 +0000)
committerVladimir Makarov <vmakarov@gcc.gnu.org>
Fri, 17 Feb 2017 16:10:59 +0000 (16:10 +0000)
2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/79541
* lra-constraints.c (curr_insn_transform): Remove wrong asm insn
instead of transforming it into USE.

From-SVN: r245536

gcc/ChangeLog
gcc/lra-constraints.c

index 0339ac9..d4a0c0d 100644 (file)
@@ -1,3 +1,9 @@
+2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
+
+       PR rtl-optimization/79541
+       * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
+       instead of transforming it into USE.
+
 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
 
        * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
index 585ca84..0098a75 100644 (file)
@@ -3773,9 +3773,9 @@ curr_insn_transform (bool check_only_p)
        fatal_insn ("unable to generate reloads for:", curr_insn);
       error_for_asm (curr_insn,
                     "inconsistent operand constraints in an %<asm%>");
-      /* Avoid further trouble with this insn. */
-      PATTERN (curr_insn) = gen_rtx_USE (VOIDmode, const0_rtx);
-      lra_invalidate_insn_data (curr_insn);
+      /* Avoid further trouble with this insn.  Don't generate use
+        pattern here as we could use the insn SP offset.  */
+      lra_set_insn_deleted (curr_insn);
       return true;
     }