https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100477
--- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> --- You're right that the #pragma can be a little flakey with inlining. This is a recurring issue that can be made worse by LTO. A fix I submitted for GCC 11 got deferred to GCC 12 (see pr98465 comment 12). I have to dust it off and resubmit it.