diff options
author | Douglas Gregor <doug.gregor@gmail.com> | 2007-10-26 19:34:03 +0000 |
---|---|---|
committer | Doug Gregor <dgregor@gcc.gnu.org> | 2007-10-26 19:34:03 +0000 |
commit | 4552f5a2c81d09f3d1af9aad2203e95162c2e3a8 (patch) | |
tree | e144a43b87857650113ed783225510d05607b2c4 /gcc | |
parent | 84f2b1d168c4cd781fd67af8ec884efd3f4d93e3 (diff) | |
download | gcc-4552f5a2c81d09f3d1af9aad2203e95162c2e3a8.zip gcc-4552f5a2c81d09f3d1af9aad2203e95162c2e3a8.tar.gz gcc-4552f5a2c81d09f3d1af9aad2203e95162c2e3a8.tar.bz2 |
re PR c++/33601 (ICE with pointers to members using "const C" as the class identifier)
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.
From-SVN: r129659
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/other/pr33601.C | 8 | ||||
-rw-r--r-- | gcc/tree.c | 4 |
4 files changed, 20 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 626f83e..6e49d2d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +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 Daniel Jacobowitz <dan@codesourcery.com> * reorg.c (emit_delay_sequence): Move insn locator from the diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 02339a0..4ec601f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2007-10-26 Douglas Gregor <doug.gregor@gmail.com> + + * g++.dg/other/pr33601.C: New. + 2007-10-26 Paolo Carlini <pcarlini@suse.de> PR c++/31988 diff --git a/gcc/testsuite/g++.dg/other/pr33601.C b/gcc/testsuite/g++.dg/other/pr33601.C new file mode 100644 index 0000000..0c17009 --- /dev/null +++ b/gcc/testsuite/g++.dg/other/pr33601.C @@ -0,0 +1,8 @@ +struct A +{ + int membervar; +}; + +typedef const A type; + +int type::* getmemberptr() { return &type::membervar; } @@ -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)); } |