From 1ceaad38dfebb9dac622f304cb76acc3cac96247 Mon Sep 17 00:00:00 2001 From: Jason Merrill Date: Sun, 31 May 1998 23:26:58 +0000 Subject: [PATCH] * pt.c (tsubst): Always copy BINFO_BASETYPES. From-SVN: r20158 --- gcc/cp/ChangeLog | 4 ++++ 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 + + * pt.c (tsubst): Always copy BINFO_BASETYPES. + 1998-05-29 scott snyder * 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)) { -- 2.7.4