diff options
author | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-26 19:34:03 +0000 |
---|---|---|
committer | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-10-26 19:34:03 +0000 |
commit | 7f0d3ba1556429f27fcdaee60c44f1b4a713c7f9 (patch) | |
tree | e144a43b87857650113ed783225510d05607b2c4 /gcc/tree.c | |
parent | 438ac2d5de61024d27b6dfb9147bd3cc31e8a9c8 (diff) | |
download | gcc-7f0d3ba1556429f27fcdaee60c44f1b4a713c7f9.tar.gz |
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
PR c++/33601
* tree.c (build_offset_type): Build canonical type based on the
TYPE_MAIN_VARIANT of the base type.
2007-10-26 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/other/pr33601.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129659 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c index 88ec29e13e3..24e758f12cd 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -5949,10 +5949,10 @@ build_offset_type (tree basetype, tree type) if (TYPE_STRUCTURAL_EQUALITY_P (basetype) || TYPE_STRUCTURAL_EQUALITY_P (type)) SET_TYPE_STRUCTURAL_EQUALITY (t); - else if (TYPE_CANONICAL (basetype) != basetype + else if (TYPE_CANONICAL (TYPE_MAIN_VARIANT (basetype)) != basetype || TYPE_CANONICAL (type) != type) TYPE_CANONICAL (t) - = build_offset_type (TYPE_CANONICAL (basetype), + = build_offset_type (TYPE_CANONICAL (TYPE_MAIN_VARIANT (basetype)), TYPE_CANONICAL (type)); } |