https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84742
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |jakub at gcc dot gnu.org Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org Target Milestone|--- |8.0 --- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- We have many loops that assume the constraints are sane and it is safe to skip all the CONSTRAINT_LEN characters, so I think it is desirable to catch this early. asm_operand_ok already has: len = CONSTRAINT_LEN (c, constraint); do constraint++; while (--len && *constraint); if (len) return 0; which catches multi-character constraints with '\0' in the middle of it, and rejects those during vregs pass that also removes them: if (asm_noperands (PATTERN (insn)) >= 0) { 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); } } So I'm just adding a check for ',' inside such constraints too.