https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92860
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> --- And the last piece is this one: if (opts->x_optimize == 0) { /* Inlining does not work if not optimizing, so force it not to be done. */ opts->x_warn_inline = 0; opts->x_flag_no_inline = 1; } where warn_inline is not Optimization.