https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111901
--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- > Later in the compilation pipeline, DCE removes insns 6 and 8 as dead code, > leaving: > > _.c.331r.cmpelim: > > 10: {x1:SI=asm_operands;clobber [scratch];} > 12: {x3:SI=asm_operands;clobber [scratch];} > 13: x1:SI=x1:SI+x3:SI > 15: NOTE_INSN_DELETED > 20: x0:SI=x1:SI<<0x1 > 21: use x0:SI So what about just marking inline asms with memory clobber as having side effects?