https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105769
--- Comment #13 from rguenther at suse dot de <rguenther at suse dot de> --- On Tue, 17 Jan 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105769 > > --- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> --- > (In reply to Richard Biener from comment #10) > > I think that's the usual pattern for the two other stack-slot sharing PRs we > > have. The liveness analysis makes wrong assumptions about CLOBBER and > > CLOBBER > > isn't a barrier for address-takens (and we don't have birth CLOBBERs). > > > > But why does -fstack-reuse=none not help? > > Because -fstack-reuse= controls behavior of the gimplifier/inliner (what kind > of CLOBBERs are emitted), not whether we reuse stack slots during expansion or > not. > And the CLOBBERs that matter here aren't coming from the -fstack-reuse= > controlled > ones, but from C++ lifetime DSE. Ah - we possibly want to gate the stack-sharing code with flag_stack_reuse then? (OTOH with inlining across TUs with different -fstack-reuse setting things are murky - both with testing the flag and without)