@@ -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);
}
new file mode 100644
@@ -0,0 +1,18 @@
+// 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) {}
+};