------- Comment #3 from hubicka at gcc dot gnu dot org 2007-10-14 12:50 ------- This patch should disable the sorry message in this case, but I would argue that outputting sorry here is right - we fail to inline alway_inline function because of implementation limitation. So I would claim 3.2.0 being buggy rather than mainline.
Honza Index: tree-inline.c =================================================================== *** tree-inline.c (revision 129072) --- tree-inline.c (working copy) *************** expand_call_inline (basic_block bb, tree *** 2560,2565 **** --- 2560,2571 ---- if (!cgraph_inline_p (cg_edge, &reason)) { if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn)) + /* For extern inline functions that get redefined we always + silently ignored alway_inline flag. Better behaviour would + be to be able to keep both bodies and use extern inline body + for inlining, but we can't do that because frontends overwrite + the body. */ + && !cg_edge->callee->local.redefined_extern_inline /* Avoid warnings during early inline pass. */ && (!flag_unit_at_a_time || cgraph_global_info_ready)) { -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33763