re PR c++/11131 (Unrelated declaration removes inline flag from function)
authorMark Mitchell <mark@codesourcery.com>
Tue, 10 Jun 2003 07:19:57 +0000 (07:19 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Tue, 10 Jun 2003 07:19:57 +0000 (07:19 +0000)
commitd58b7c2d5dec4e603b4eb740b4d7b2ce17cc6ce1
tree99bd6c6f94bdf41422f8f7a377f59d5cb319ff5c
parentc566f9bd367cf07de6e9151dd5a5882241b367bf
re PR c++/11131 (Unrelated declaration removes inline flag from function)

PR c++/11131
* tree-inline.c (inlinable_function_p): Call the language-specific
hook early.

PR c++/11131
* cp-tree.h (template_for_substitution): Declare.
* decl2.c (mark_used): Use it when figuring out whether or not a
function is inline.
* pt.c (template_for_substitution): Give it external linkage.
* tree.c (cp_cannot_inline_tree_fn): Instantiate as early as
possible.

PR c++/11131
* g++.dg/opt/template1.C: New test.

From-SVN: r67698
gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/decl2.c
gcc/cp/pt.c
gcc/cp/tree.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/opt/template1.C [new file with mode: 0644]
gcc/tree-inline.c