This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
(C++) partial specialization patch
- To: gcc-patches at gcc dot gnu dot org
- Subject: (C++) partial specialization patch
- From: Jason Merrill <jason at redhat dot com>
- Date: Thu, 22 Jun 2000 16:53:47 -0400
Fixes g++.pt/memtemp96.C when compiled with optimization; we were
using the generic version for the <char> instantiation rather than
wait for the specialization to be defined.
2000-06-22 Jason Merrill <jason@redhat.com>
* pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
(tsubst_friend_function): Copy it here.
*** pt.c.~1~ Thu Jun 22 16:35:01 2000
--- pt.c Thu Jun 22 16:35:06 2000
*************** tsubst_friend_function (decl, args)
*** 4507,4513 ****
instantiation of anything. */
DECL_USE_TEMPLATE (new_friend) = 0;
if (TREE_CODE (decl) == TEMPLATE_DECL)
! DECL_USE_TEMPLATE (DECL_TEMPLATE_RESULT (new_friend)) = 0;
/* The mangled name for the NEW_FRIEND is incorrect. The call to
tsubst will have resulted in a call to
--- 4511,4521 ----
instantiation of anything. */
DECL_USE_TEMPLATE (new_friend) = 0;
if (TREE_CODE (decl) == TEMPLATE_DECL)
! {
! DECL_USE_TEMPLATE (DECL_TEMPLATE_RESULT (new_friend)) = 0;
! DECL_SAVED_TREE (DECL_TEMPLATE_RESULT (new_friend))
! = DECL_SAVED_TREE (DECL_TEMPLATE_RESULT (decl));
! }
/* The mangled name for the NEW_FRIEND is incorrect. The call to
tsubst will have resulted in a call to
*************** tsubst_decl (t, args, type, in_decl)
*** 5727,5732 ****
--- 5735,5741 ----
TREE_CHAIN (r) = NULL_TREE;
DECL_PENDING_INLINE_INFO (r) = 0;
DECL_PENDING_INLINE_P (r) = 0;
+ DECL_SAVED_TREE (r) = NULL_TREE;
TREE_USED (r) = 0;
if (DECL_CLONED_FUNCTION (r))
{