------- Comment #5 from matz at gcc dot gnu dot org 2009-09-09 15:46 ------- Oh, maybe an explanation: what is expected is that such decls (externs) either have no context set (global) or have the current function as context. For inlining (cloning/versioning all the same) this needs to be done by remapping the decls. No idea why this isn't called on the _switch_mode_errorstr in the inliner. As this works with normal functions I assume that somehow the free_lang_data work changed internal structures in a way that this decl isn't visible to the inliner anymore (in a way).
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41275