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

--- Comment #9 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #8)
> > 
> > the synthesised functions (actor, destroy) are intended to be TU-local.
> > the ramp function is what remains of the user's original function after the
> > coroutine body is outlined - so that has the original signature of the 
> > user's
> > function.
> > 
> > We do use counters to generate local symbol names for frame-promoted
> > temporaries, so I suppose that there is a possibility that the name(s) that 
> > are
> > intended to be TU-local become visible across TUs in LTO; but those should 
> > be
> > the names of coroutine frame entries (i.e. fields in a structure, not
> > themselves global symbols).
> 
> It is the type that we get warning on. 

The frame type itself .. I see...

> So if it is never used to pass
> data between translation units, the correct solution would be to put it
> to the anoymous namespace.

... OK .. that makes sense; the frame is type-erased for calls from other TUs,
so that this seems the right solution.

> (or avoid producing ODR name completely but that would lead to worse
> code)

Yeah, we need the name for the outlined function(s) so that there is
opportunity to inline there,

> 
> Honza

Reply via email to