https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120850
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> --- > unless this is a special function known to the compiler it still be subject > to optimizations that will break this rules. Why do you think that is the case? Do you any examples of that because that would be wrong code in general. The only time gcc optimizes functions if it is know to the compiler (so special functions and ones known via lto or in the same tu or known behavior via attributes).