On Fri, Feb 28, 2025 at 11:09:21AM +0100, Richard Biener wrote: > When the C++ frontend clones a CTOR we do not copy ASM_EXPR constraints > fully as walk_tree does not recurse to TREE_PURPOSE of TREE_LIST nodes. > At this point doing that seems too dangerous so the following instead > avoids gimplification of ASM_EXPRs to clobber the shared constraints > and unshares it there, like it also unshares TREE_VALUE when it > re-writes a "+" output constraint to separate "=" output and matching > input constraint. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, OK? > > Thanks, > Richard. > > PR middle-end/66279 > * gimplify.cc (gimplify_asm_expr): Copy TREE_PURPOSE before > rewriting it for "+" processing. > > * g++.dg/pr66279.C: New testcase.
LGTM. Jakub