aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2011-10-18 15:36:28 -0400
committerJason Merrill <jason@gcc.gnu.org>2011-10-18 15:36:28 -0400
commit15e0646fde23f549c224be5ba3ee9bd11eb748de (patch)
treea1100a8b4b514c22a4f0f025219d9d00f406feb8 /gcc/cp/pt.c
parentd2f706418a847ebd9565638d76defc30ba9c30a0 (diff)
downloadgcc-15e0646fde23f549c224be5ba3ee9bd11eb748de.zip
gcc-15e0646fde23f549c224be5ba3ee9bd11eb748de.tar.gz
gcc-15e0646fde23f549c224be5ba3ee9bd11eb748de.tar.bz2
re PR c++/50531 ([C++0x] ICE on defaulted template destructor)
PR c++/50531 * pt.c (instantiate_decl): Recognize when a function defaulted outside the class is already instantiated. From-SVN: r180162
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 6fc60d5..56fa632 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -18045,6 +18045,8 @@ instantiate_decl (tree d, int defer_ok,
d = DECL_CLONED_FUNCTION (d);
if (DECL_TEMPLATE_INSTANTIATED (d)
+ || (TREE_CODE (d) == FUNCTION_DECL
+ && DECL_DEFAULTED_FN (d) && DECL_INITIAL (d))
|| DECL_TEMPLATE_SPECIALIZATION (d))
/* D has already been instantiated or explicitly specialized, so
there's nothing for us to do here.