mirror of git://gcc.gnu.org/git/gcc.git
re PR c++/37342 (same canonical type node for different types void (Asm::*)(std::ostream&) and void (Asm::* const)(std::ostream&))
2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/37342
* tree.c (cp_build_qualified_type_real): Deal with sharing of
TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
types.
2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
PR c++/37342
* g++.dg/other/canon-37342.C: New.
From-SVN: r140037
This commit is contained in:
parent
37fbe8a344
commit
7aa4a1dfa9
|
|
@ -1,3 +1,10 @@
|
||||||
|
2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
|
||||||
|
|
||||||
|
PR c++/37342
|
||||||
|
* tree.c (cp_build_qualified_type_real): Deal with sharing of
|
||||||
|
TYPE_LANG_SPECIFIC in the canonical types of pointer-to-method
|
||||||
|
types.
|
||||||
|
|
||||||
2008-09-04 Ian Lance Taylor <iant@google.com>
|
2008-09-04 Ian Lance Taylor <iant@google.com>
|
||||||
|
|
||||||
* parser.c (check_no_duplicate_clause): Change code parameter to
|
* parser.c (check_no_duplicate_clause): Change code parameter to
|
||||||
|
|
|
||||||
|
|
@ -877,6 +877,17 @@ cp_build_qualified_type_real (tree type,
|
||||||
&& TYPE_LANG_SPECIFIC (result) == TYPE_LANG_SPECIFIC (type))
|
&& TYPE_LANG_SPECIFIC (result) == TYPE_LANG_SPECIFIC (type))
|
||||||
TYPE_LANG_SPECIFIC (result) = NULL;
|
TYPE_LANG_SPECIFIC (result) = NULL;
|
||||||
|
|
||||||
|
/* We may also have ended up building a new copy of the canonical
|
||||||
|
type of a pointer-to-method type, which could have the same
|
||||||
|
sharing problem described above. */
|
||||||
|
if (TYPE_CANONICAL (result) != TYPE_CANONICAL (type)
|
||||||
|
&& TREE_CODE (type) == POINTER_TYPE
|
||||||
|
&& TREE_CODE (TREE_TYPE (type)) == METHOD_TYPE
|
||||||
|
&& (TYPE_LANG_SPECIFIC (TYPE_CANONICAL (result))
|
||||||
|
== TYPE_LANG_SPECIFIC (TYPE_CANONICAL (type))))
|
||||||
|
TYPE_LANG_SPECIFIC (TYPE_CANONICAL (result)) = NULL;
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2008-09-05 Douglas Gregor <doug.gregor@gmail.com>
|
||||||
|
|
||||||
|
PR c++/37342
|
||||||
|
* g++.dg/other/canon-37342.C: New.
|
||||||
|
|
||||||
2008-09-05 Joseph Myers <joseph@codesourcery.com>
|
2008-09-05 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* gcc.c-torture/compile/20080903-1.c: New test.
|
* gcc.c-torture/compile/20080903-1.c: New test.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
class Asm;
|
||||||
|
template<typename _CharT> class basic_ostream;
|
||||||
|
typedef basic_ostream<char> ostream;
|
||||||
|
class Options {
|
||||||
|
typedef void (Asm::* emitfunc_t) (ostream &);
|
||||||
|
emitfunc_t getemit () const { return emitfunc; }
|
||||||
|
emitfunc_t emitfunc;
|
||||||
|
};
|
||||||
Loading…
Reference in New Issue