https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101279
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- (In reply to frankhb1989 from comment #3) > There is a more specific instance here: can_inline_edge_by_limits_p in > ipa-inline.cc treats flags and "optimize" attributes differently. A bit up there's a blacklist we maintain where inlining is not OK because it results in semantic differences. Generally we it's hard to second-guess the users intention when looking at an inline edge with different optimization settings of caller and callee. For C++ comdats there might be even multiple variants with different optimization level (but we only keep one, special-casing this a bit).