aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/parser.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2012-01-23 11:35:31 -0500
committerJason Merrill <jason@gcc.gnu.org>2012-01-23 11:35:31 -0500
commitaef3a6b297352e3ac17d7588682dbc956861bf58 (patch)
tree7d70f52991e33cb3ff8fc4c0f1dad261445bf079 /gcc/cp/parser.c
parent5965b617aa6ad71890de872bdbaa6fd0d7aab216 (diff)
downloadgcc-aef3a6b297352e3ac17d7588682dbc956861bf58.zip
gcc-aef3a6b297352e3ac17d7588682dbc956861bf58.tar.gz
gcc-aef3a6b297352e3ac17d7588682dbc956861bf58.tar.bz2
re PR c++/51925 (ICE in tsubst with using and template function)
PR c++/51925 * class.c (add_method): Set OVL_USED for using-decls. * tree.c (ovl_scope): New. * cp-tree.h: Declare it. * parser.c (cp_parser_template_name): Use it. * semantics.c (baselink_for_fns): Likewise. * name-lookup.c (set_inherited_value_binding_p): Likewise. From-SVN: r183438
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r--gcc/cp/parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c
index c4c3ef4..491f48e 100644
--- a/gcc/cp/parser.c
+++ b/gcc/cp/parser.c
@@ -12722,7 +12722,7 @@ cp_parser_template_name (cp_parser* parser,
its name; we will look it up again during template instantiation. */
if (DECL_FUNCTION_TEMPLATE_P (decl) || !DECL_P (decl))
{
- tree scope = CP_DECL_CONTEXT (get_first_fn (decl));
+ tree scope = ovl_scope (decl);
if (TYPE_P (scope) && dependent_type_p (scope))
return identifier;
}