diff options
author | Jason Merrill <jason@redhat.com> | 2009-11-09 13:32:44 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2009-11-09 13:32:44 -0500 |
commit | ff14c1f700199f7b27863f55f0e42d3066939f71 (patch) | |
tree | 6507c687d383e5e2276b90e62c5aef4ca99bc13c /gcc/cp | |
parent | 8b0c13a8240a7f49775c2a4e71da39db3515ec19 (diff) | |
download | gcc-ff14c1f700199f7b27863f55f0e42d3066939f71.zip gcc-ff14c1f700199f7b27863f55f0e42d3066939f71.tar.gz gcc-ff14c1f700199f7b27863f55f0e42d3066939f71.tar.bz2 |
re PR c++/41994 (ICE with &A::operator T)
PR c++/41994
* pt.c (tsubst_baselink): tsubst the name.
From-SVN: r154041
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/pt.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 74122c1..f126a10 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2009-11-09 Jason Merrill <jason@redhat.com> + + PR c++/41994 + * pt.c (tsubst_baselink): tsubst the name. + 2009-11-07 Jason Merrill <jason@redhat.com> PR c++/37920 diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index 6e708b3..3efeda8 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -10318,7 +10318,7 @@ tsubst_baselink (tree baselink, tree object_type, qualifying_scope = tsubst (qualifying_scope, args, complain, in_decl); fns = BASELINK_FUNCTIONS (baselink); - optype = BASELINK_OPTYPE (baselink); + optype = tsubst (BASELINK_OPTYPE (baselink), args, complain, in_decl); if (TREE_CODE (fns) == TEMPLATE_ID_EXPR) { template_id_p = true; @@ -10329,6 +10329,8 @@ tsubst_baselink (tree baselink, tree object_type, complain, in_decl); } name = DECL_NAME (get_first_fn (fns)); + if (IDENTIFIER_TYPENAME_P (name)) + name = mangle_conv_op_name_for_type (optype); baselink = lookup_fnfields (qualifying_scope, name, /*protect=*/1); /* If lookup found a single function, mark it as used at this @@ -10347,8 +10349,7 @@ tsubst_baselink (tree baselink, tree object_type, BASELINK_FUNCTIONS (baselink), template_args); /* Update the conversion operator type. */ - BASELINK_OPTYPE (baselink) - = tsubst (optype, args, complain, in_decl); + BASELINK_OPTYPE (baselink) = optype; if (!object_type) object_type = current_class_type; |