The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79541
The patch was successfully bootstrapped and tested on x86-64. Committed as rev. 245536.
Index: ChangeLog =================================================================== --- ChangeLog (revision 245535) +++ ChangeLog (working copy) @@ -1,3 +1,9 @@ +2017-02-17 Vladimir Makarov <vmaka...@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 <seg...@kernel.crashing.org> * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments. Index: lra-constraints.c =================================================================== --- lra-constraints.c (revision 245484) +++ lra-constraints.c (working copy) @@ -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; }