Thanks for a quick response! On Tue, Apr 7, 2015 at 5:34 PM, Rich Felker wrote: > I'm > guessing you need -O0 to trigger it, no? I'm experience problem with optimization for size (-Os). It's look like behaviour was changed in later GCC (at least from 4.8.3). I will test another optimization levels. > > i wonder if __stat_fix could be inlined in a way that the > > compiler knows it shouldnt clobber r2. > > In practice it always is, at least for me. But relying on that for > semantic purposes is not valid. > I read that in linux kernel are used attribute "always_inline" for critical parts.