diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-05-31 23:26:58 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-05-31 19:26:58 -0400 |
commit | 1ceaad38dfebb9dac622f304cb76acc3cac96247 (patch) | |
tree | ff27bf481cbb0051bfab81d496b274a0a05579b6 | |
parent | 9045f690f8149396782d96b723b6f97f78dddb37 (diff) | |
download | gcc-1ceaad38dfebb9dac622f304cb76acc3cac96247.zip gcc-1ceaad38dfebb9dac622f304cb76acc3cac96247.tar.gz gcc-1ceaad38dfebb9dac622f304cb76acc3cac96247.tar.bz2 |
* pt.c (tsubst): Always copy BINFO_BASETYPES.
From-SVN: r20158
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/pt.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 16e5074..c7e34a1 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +1998-05-31 Jason Merrill <jason@yorick.cygnus.com> + + * pt.c (tsubst): Always copy BINFO_BASETYPES. + 1998-05-29 scott snyder <snyder@d0sgif.fnal.gov> * tree.c (layout_basetypes): If we change TYPE_SIZE, change diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index a214906..3927b51 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -4830,16 +4830,14 @@ tsubst (t, args, in_decl) case TREE_VEC: if (type != NULL_TREE) { - /* A binfo node. */ + /* A binfo node. We always need to make a copy, of the node + itself and of its BINFO_BASETYPES. */ t = copy_node (t); /* Make sure type isn't a typedef copy. */ type = BINFO_TYPE (TYPE_BINFO (type)); - if (type == TREE_TYPE (t)) - return t; - TREE_TYPE (t) = complete_type (type); if (IS_AGGR_TYPE (type)) { |