http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45781
--- Comment #3 from Steve Ellcey <sje at cup dot hp.com> 2010-09-30 17:41:36 UTC --- (In reply to comment #1) > The decision is reasonable (I suppose partial inlining will inline the > if (!init) case) as the function is called exactly once then and thus > should be optimized for size and put into a separate section. But when I compile with -O2, partial inlining doesn't inline anything. All the calls still exist as they are in the code. Actually, the only reason I can see for moving init_target_chars to .text.unlikely is that there are 3 'early returns' in fold_builtin_snprintf_chk that could prevent the execution from ever getting to the init_target_chars call. Maybe that is why GCC put it in .text.unlikely. Very strange, I added: tree rewrite_call_expr() { return 0; } to my test case and recompiled to see if this new code went into .text.unlikely but for some reason that caused everything (including init_target_chars) to be put into .text. > > The question is thus, why does that break IA64 bootstrap? > > If IA64 doesn't support .text.unlikely it should define > UNLIKELY_EXECUTED_TEXT_SECTION_NAME appropriately. Yes, I think I need to define this for IA64 HP-UX.