https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119028
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- GCC handles the sqrt function by inlining it conditional on no errno setting necessary, but that comes at a code-size cost which is why this is disabled with -Os. We are only later figuring the argument is always positive. So this is expected - you can't rely on sqrt() being inlined. In this case we could do better, not relying on the two-stage approach.