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

--- Comment #2 from Jan Hubicka <hubicka at ucw dot cz> ---
> It might be possible to inline such functions by creating a "stub" call either
> after or before the inlined function body where the "stub" would just be there
> to represent the attributes.
> 
> Say, inline a 'deallocator' fn
> 
>   my_free (x);
> 
> as
> 
>   <inlined impl>
>   .IFN_STUB_DEALLOCATE (x);
> 
> or sth like that where those stubs are removed after any diagnostics with
> regard to pairing of malloc/free have been issued (not sure where that
> currently
> happens).

We have similar issue with functions calling alloca (that we may inline
if was able to insert stack restore).  I was always lazy to implement
this since we need to also insert it on the EH cleanup edges, but
perhaps it is time to learn inliner about such tricks...

Honza

Reply via email to