------- Comment #5 from steven at gcc dot gnu dot org 2010-08-12 21:30 ------- I don't think this is a heuristics bug at all. You're not getting an error or a warning about a missed optimization (inlining).
You get a sorry, and that only happens if GCC tries but fails to inline an always_inline function. But the reason for the sorry is that the "call is unlikely and code size would grow". That should never be checked for always_inline functions. The always_inline attribute is basically an attribute to shut off the inlining heuristics. A "do as I say"-attribute. The sorry means that GCC is not doing what you tell it to do. The heuristics changes in GCC 4.6 just paper over this problem. If I'm right, anyway, that this is an always_inline problem. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45267