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

--- Comment #4 from Iain Sandoe <iains at gcc dot gnu.org> ---
I think the problem here is related to the setting of DECL_ABSTRACT_ORIGIN on
the contract checking functions.

"
   DECL_ABSTRACT_ORIGIN, if non-NULL, points to the original (abstract)
    ..._DECL node of which this decl is an (inlined or template expanded)
    instance.

"

but that is not what these synthesised functions are; rather they are entirely
new functions that implement a series of tests and possibly diagnostic output. 
In fact, they don't necessarily even have the same signature as the original. 
They certainly do not have the same block layout as the original.

It's not clear that we need these functions to be identified as the same
function as the original (if that is really a requirement - e.g. to make the
function name the same in these helpers - then we could do a similar process to
the one used for coroutine helpers).

Reply via email to