pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new FUNCTION_DECLs.
authorMark Mitchell <mmitchell@usa.net>
Thu, 19 Mar 1998 22:31:22 +0000 (22:31 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Thu, 19 Mar 1998 22:31:22 +0000 (22:31 +0000)
* pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
FUNCTION_DECLs.

From-SVN: r18720

gcc/cp/ChangeLog
gcc/cp/pt.c
gcc/testsuite/g++.old-deja/g++.pt/crash3.C [new file with mode: 0644]

index 2169907c98898110cb6db41e4d9747bba5e6ed59..5c41abc7b246eed2cf328d0490e13037ad0a56bb 100644 (file)
@@ -1,3 +1,8 @@
+Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
+
+       * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
+       FUNCTION_DECLs.
+
 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
 
        * decl.c (make_implicit_typename): Lose useless code.
index be3e5ac23e14fad553cde7000c27c007acb3f0f2..6102bead6ca3deca7cdc0e30dc5145ed96c5a5d2 100644 (file)
@@ -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 (file)
index 0000000..0d2a7cd
--- /dev/null
@@ -0,0 +1,16 @@
+// Build don't link:
+
+template <class Type>
+class CVector {
+public:
+    CVector<int> f() const
+    {
+       CVector<int> v(n);
+       return v;
+    }
+    CVector<long> g() const
+    {
+       CVector<long> v(n);
+       return v;
+    }
+};