https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120243
--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> --- update: It seems not simply the inlining of the actor into the ramp but also when the result of that is then inlined into main() If I apply DECL_DISREGARD_INLINE_LIMITS() to the actor - so that it is inlined into the ramp at O1 - but then mark the ramp as __attribute__((__noinline__)) then the code works as expected (including at O2, O3) .. so two levels of inlining are involved..