https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120850
--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Cristian RodrÃguez from comment #9) > (In reply to Andrew Pinski from comment #2) > > Using an inline-asm to cause compiler barriers should be enough to stop gcc > > from optimizing the code away. > > The library implementation does that. but callers wont know, the > implementation is not inline.. Right, gcc can't assume anything about a function it does not know.