https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106087
--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>: https://gcc.gnu.org/g:71e3daa31cfa35ee58e5899cb00767be92227fd2 commit r13-1581-g71e3daa31cfa35ee58e5899cb00767be92227fd2 Author: Andrew Pinski <apin...@marvell.com> Date: Thu Jul 7 22:06:19 2022 +0000 Fix tree-opt/PR106087: ICE with inline-asm with multiple output and assigned only static vars The problem here is that when we mark the ssa name that was referenced in the now removed dead store (to a write only static variable), the inline-asm would also be removed even though it was defining another ssa name. This fixes the problem by checking to make sure that the statement was only defining one ssa name. Committed as approved after a bootstrapped and tested on x86_64 with no regressions. PR tree-optimization/106087 gcc/ChangeLog: * tree-ssa-dce.cc (simple_dce_from_worklist): Check to make sure the statement is only defining one operand. gcc/testsuite/ChangeLog: * gcc.c-torture/compile/inline-asm-1.c: New test.