https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96354

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #12)
> Created attachment 48949 [details]
> gcc11-pr96354.patch
> 
> Untested fix.

So I wonder where exactly we get this non-invariant address from and what
makes substitution into regular stmts fixed up?

Looks like the substitution is for &<retval> which we deal with
separately for regular stmts.  I guess we do not share the ADDR_EXPR
tree so we can't put a remap of that here.  But we may be able to
detect this case up in copy_debug_stmt itself?  The debug stmt seems to be

# DEBUG D#2 => MEM[(double *)&<retval>]

and retval maps to D.2566[_9].  And I guess in regular code we never end
up with &<retval> anywhere.  So not sure how we ended up with that DEBUG
stmt in the first place...

Reply via email to