From ff36954809a7b99a9ea0927d11b1899d4e4914d1 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Thu, 19 Mar 1998 22:31:22 +0000 Subject: [PATCH] pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new FUNCTION_DECLs. * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new FUNCTION_DECLs. From-SVN: r18720 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/pt.c | 1 + gcc/testsuite/g++.old-deja/g++.pt/crash3.C | 16 ++++++++++++++++ 3 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/g++.old-deja/g++.pt/crash3.C diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 2169907c988..5c41abc7b24 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 19 19:01:48 1998 Mark Mitchell + + * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new + FUNCTION_DECLs. + Thu Mar 19 11:51:58 1998 Jason Merrill * decl.c (make_implicit_typename): Lose useless code. diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index be3e5ac23e1..6102bead6ca 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -3964,6 +3964,7 @@ tsubst (t, args, in_decl) DECL_DEFER_OUTPUT (r) = 0; TREE_CHAIN (r) = NULL_TREE; DECL_CHAIN (r) = NULL_TREE; + DECL_PENDING_INLINE_INFO (r) = 0; if (IDENTIFIER_OPNAME_P (DECL_NAME (r))) grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r)); diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash3.C b/gcc/testsuite/g++.old-deja/g++.pt/crash3.C new file mode 100644 index 00000000000..0d2a7cd935d --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash3.C @@ -0,0 +1,16 @@ +// Build don't link: + +template +class CVector { +public: + CVector f() const + { + CVector v(n); + return v; + } + CVector g() const + { + CVector v(n); + return v; + } +};