]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR c++/6255 (ICE with templatess)
authorJason Merrill <jason@redhat.com>
Tue, 9 Jul 2002 23:46:07 +0000 (19:46 -0400)
committerJason Merrill <jason@gcc.gnu.org>
Tue, 9 Jul 2002 23:46:07 +0000 (19:46 -0400)
        PR c++/6255
        * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
        modifying the old one.

From-SVN: r55353

gcc/cp/ChangeLog
gcc/cp/decl.c

index c926d3c0e17474a8f203a6bc22f933976d8ab8ff..ec6bea21db98bf417472c0eaa016a730fea7e58d 100644 (file)
@@ -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-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 
        * pt.c (can_complete_type_without_circularity): Add static to
index 9f683f2ef846530b72d450d30b0b7617b59f2a9f..82ec357bd9c2025c5f90cdfbde6662daac4d787d 100644 (file)
@@ -6101,7 +6101,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