From: Vladimir Makarov Date: Fri, 17 Feb 2017 16:10:59 +0000 (+0000) Subject: re PR rtl-optimization/79541 (lra reads uninitialized memory (with invalid input)) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8b4aea7364cbb2e82e0e46810c6a99bf001ff25b;p=gcc.git re PR rtl-optimization/79541 (lra reads uninitialized memory (with invalid input)) 2017-02-17 Vladimir Makarov PR rtl-optimization/79541 * lra-constraints.c (curr_insn_transform): Remove wrong asm insn instead of transforming it into USE. From-SVN: r245536 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0339ac9c5d3..d4a0c0def35 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2017-02-17 Vladimir Makarov + + 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 * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments. diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c index 585ca841aee..0098a7585e8 100644 --- a/gcc/lra-constraints.c +++ b/gcc/lra-constraints.c @@ -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 %"); - /* 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; }