From: Richard Henderson Date: Mon, 17 Jun 2002 00:29:37 +0000 (-0700) Subject: tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test after template instantiation. X-Git-Tag: releases/gcc-3.1.1~140 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b046a6c927a49dbcb60ba4e0931937702612838;p=thirdparty%2Fgcc.git tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test after template instantiation. * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test after template instantiation. * g++.dg/opt/inline3.C: New. From-SVN: r54689 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d87e6c7c0d59..20fbb8f574d6 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2002-06-16 Richard Henderson + + PR opt/6793 + * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test + after template instantiation. + 2002-06-07 H.J. Lu (hjl@gnu.org) * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT. @@ -212,12 +218,12 @@ 2002-04-11 Andrew Haley - * typeck.c (type_after_usual_arithmetic_conversions): - If two types have the same variant, return immediately. - When two floating-point operands are the same precision: - convert to float if one of the operands is float; - if neither operand is one of the standard types, return the type - of the first operand. + * typeck.c (type_after_usual_arithmetic_conversions): + If two types have the same variant, return immediately. + When two floating-point operands are the same precision: + convert to float if one of the operands is float; + if neither operand is one of the standard types, return the type + of the first operand. 2002-04-12 Richard Sandiford diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index a614bc1ee358..98f897346bbb 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -2168,7 +2168,8 @@ cp_cannot_inline_tree_fn (fnp) && TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn))) { fn = *fnp = instantiate_decl (fn, /*defer_ok=*/0); - return TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn)); + if (TI_PENDING_TEMPLATE_FLAG (DECL_TEMPLATE_INFO (fn))) + return 1; } if (varargs_function_p (fn))