https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98603
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org, | |vmakarov at gcc dot gnu.org --- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> --- The bug is function.c (instantiate_virtual_regs_in_insn): if (!check_asm_operands (PATTERN (insn))) { error_for_asm (insn, "impossible constraint in %<asm%>"); /* For asm goto, instead of fixing up all the edges just clear the template and clear input operands (asm goto doesn't have any output operands). */ if (JUMP_P (insn)) { rtx asm_op = extract_asm_operands (PATTERN (insn)); ASM_OPERANDS_TEMPLATE (asm_op) = ggc_strdup (""); ASM_OPERANDS_INPUT_VEC (asm_op) = rtvec_alloc (0); ASM_OPERANDS_INPUT_CONSTRAINT_VEC (asm_op) = rtvec_alloc (0); } else delete_insn (insn); } As the comment documents, that was correct before support for outputs in asm goto has been added, but for asm insn with outputs, there are multiple problems. One is that extract_asm_operands extracts just one of the ASM_OPERANDS, but with multiple outputs there can be several, and those need to be handled in sync. And the other is that we still keep the incorrectly constrained outputs if any in the IL.