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

--- Comment #7 from Jan Hubicka <hubicka at ucw dot cz> ---
> > > What about escape bits? Is it OK to save the address to global memory
> > > and then check it in the destructor?
> > 
> > Yes, but does that matter? After the function returns the pointer is invalid
> > and can't be used for anything. It's just an invalid pointer value that
> > happens to be correctly aligned for the parameter type.
> 
> To be precise, in our implementation the pointer is invalid after the end of
> the full-expression that contains the call (implementation-defined per
> https://eel.is/c++draft/expr.call#6).

PTA does not really see lifitimes. This means that the pointer going to
returned value set may artifically cause conflict with something else.
If I am going to special case hidden references, I may just add them
NOT_RETURNED flag too, which will make things to work slightly smoother.

Reply via email to