Commit 99676625 by Jason Merrill Committed by Jason Merrill

PR c++/72796 - wrong resolution of scoped method call.

	* typeck.c (finish_class_member_access_expr): Avoid stripping
	SCOPE_REF to dependent base.

From-SVN: r239136
parent c3f20327
2016-08-04 Jason Merrill <jason@redhat.com>
PR c++/72796
* typeck.c (finish_class_member_access_expr): Avoid stripping
SCOPE_REF to dependent base.
2016-08-04 Thomas Schwinge <thomas@codesourcery.com>
* parser.c (cp_ensure_no_oacc_routine): Improve diagnostics.
......
......@@ -2683,7 +2683,7 @@ finish_class_member_access_expr (cp_expr object, tree name, bool template_p,
{
dependent:
return build_min_nt_loc (UNKNOWN_LOCATION, COMPONENT_REF,
orig_object, name, NULL_TREE);
orig_object, orig_name, NULL_TREE);
}
object = build_non_dependent_expr (object);
}
......
// PR c++/72796
// { dg-do compile { target c++11 } }
struct a;
template <int> struct b { typedef a c; };
struct d {
void e(int);
};
struct a : d {
void e(int) = delete;
};
template <int f> struct g : b<f>::c {
g(int) { this->d::e(0); }
};
struct h : g<0> {
using i = g;
h() : i(0) {}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment