summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-09 23:45:37 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2002-07-09 23:45:37 +0000
commitb6747d99da1c76acb007f48060509870c85f5dae (patch)
treeaf467a80124ddefab2b701d2df69b27848b0bb87
parent4c487414d6b9fb7c9d35175a22c803b5e556095e (diff)
downloadppe42-gcc-b6747d99da1c76acb007f48060509870c85f5dae.tar.gz
ppe42-gcc-b6747d99da1c76acb007f48060509870c85f5dae.zip
PR c++/6255
* decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than modifying the old one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55352 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog6
-rw-r--r--gcc/cp/decl.c8
2 files changed, 13 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 465716da069..70066d18d41 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/6255
+ * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
+ modifying the old one.
+
2002-07-09 Mark Mitchell <mark@codesourcery.com>
* cp-tree.h (constructor_name_p): Declare it.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index b5d18b4c67c..11d8fe58b80 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -6072,7 +6072,13 @@ lookup_name_real (name, prefer_type, nonclass, namespaces_only)
if (got_scope && got_scope != type
&& val && TREE_CODE (val) == TYPE_DECL
&& TREE_CODE (TREE_TYPE (val)) == TYPENAME_TYPE)
- TYPE_CONTEXT (TREE_TYPE (val)) = got_scope;
+ {
+ val = TREE_TYPE (val);
+ val = build_typename_type (got_scope, name,
+ TYPENAME_TYPE_FULLNAME (val),
+ TREE_TYPE (val));
+ val = TYPE_STUB_DECL (val);
+ }
}
}
else
OpenPOWER on IntegriCloud