https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487
--- Comment #28 from Federico Kircheis <federico.kircheis at gmail dot com> --- >Edit: sorry, my last comment about what GCC thinks is wrong. Unless it is going to inline the function call, in that case the attributes are as-if ignored (at least the case I've tested with GCC 11.2).