From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7321 invoked by alias); 19 Feb 2009 14:31:05 -0000 Received: (qmail 7148 invoked by uid 48); 19 Feb 2009 14:30:48 -0000 Date: Thu, 19 Feb 2009 14:31:00 -0000 Message-ID: <20090219143048.7147.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c++/39242] [4.4 Regression] Inconsistent reject / accept of code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-02/txt/msg01723.txt.bz2 ------- 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