From b4d4cd13ec2510552d3b4c0bb73f5723bc42a25c Mon Sep 17 00:00:00 2001
From: mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Mon, 17 Apr 2000 23:12:07 +0000
Subject: [PATCH] 	* method.c (make_thunk): Set DECL_CONTEXT for a
 THUNK_DECL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33216 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cp/ChangeLog | 4 ++++
 gcc/cp/method.c  | 1 +
 2 files changed, 5 insertions(+)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 08fbb76b87a0..da6fca8546a1 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
+
+	* method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
+
 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
 
 	* class.c (build_vtable_entry): Don't build thunks for type-info
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 4d28c209af20..31b02be8a18a 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -2065,6 +2065,7 @@ make_thunk (function, delta, vcall_index)
 	= vcall_index * int_size_in_bytes (vtable_entry_type);
       DECL_EXTERNAL (thunk) = 1;
       DECL_ARTIFICIAL (thunk) = 1;
+      DECL_CONTEXT (thunk) = DECL_CONTEXT (func_decl);
       /* So that finish_file can write out any thunks that need to be: */
       pushdecl_top_level (thunk);
     }
-- 
GitLab