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

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Nils Gladitz from comment #3)
> Thanks for looking into this!

just speculation so far ...

> Any idea what the potential implications are?

Not yet.

> I assume I can't just ignore the warning as this will likely break code?

My expectations at present is that the front end actions on a coroutine are
expected to produce functions and a frame type that are TU-local.

At this point, it's not clear whether it is ever valid to merge these using LTO
(and I don't think that was specifically addressed in any of my discussions in
WG21 or with implementers on other compilers).

> When I turn off LTO the diagnostic will go away but the ODR violations are
> still there; could they still break something?

I *think* the "ODR violation" is to do with not giving the frame types unique
names per TU so that there is a [probably invalid] attempt to merge them.

.. but, as noted above, I guess we should consider carefully if the frames can
ever be considered mergeable (which would imply that the actor and destroyer
functions were also).

If they are _never_ validly mergeable, then the ODR violation is not "real" but
the consequence of a naming scheme that is not good enough.  As per my
expectations when implementing that is the case (i.e. it should be OK).

Reply via email to