------- Comment #5 from rguenth at gcc dot gnu dot org 2009-02-19 14:30 ------- Or rather we don't want template instantiation (and errors from it) to differ from optimized to non-optimized build. So,
Index: cp/pt.c =================================================================== --- cp/pt.c (revision 144292) +++ cp/pt.c (working copy) @@ -15285,7 +15285,7 @@ instantiate_decl (tree d, int defer_ok, /* ... but we instantiate inline functions so that we can inline them and ... */ && ! (TREE_CODE (d) == FUNCTION_DECL - && possibly_inlined_p (d)) + && DECL_DECLARED_INLINE_P (d)) /* ... we instantiate static data members whose values are needed in integral constant expressions. */ && ! (TREE_CODE (d) == VAR_DECL @@ -15363,7 +15363,7 @@ instantiate_decl (tree d, int defer_ok, /* Instantiate inline functions so that the inliner can do its job, even though we'll not be emitting a copy of this function. */ - if (!(TREE_CODE (d) == FUNCTION_DECL && possibly_inlined_p (d))) + if (!(TREE_CODE (d) == FUNCTION_DECL && !DECL_UNINLINABLE (d))) goto out; } ? -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jason at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39242