* tree.c (cp_tree_equal): Remove COMPONENT_REF special case.
From-SVN: r249813
+2017-06-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/81188 - matching decltype of member function call.
+ * tree.c (cp_tree_equal): Remove COMPONENT_REF special case.
+
2017-06-29 Nathan Sidwell <nathan@acm.org>
PR c++/81247
return false;
return cp_tree_equal (TREE_OPERAND (t1, 1), TREE_OPERAND (t1, 1));
- case COMPONENT_REF:
- if (TREE_OPERAND (t1, 1) != TREE_OPERAND (t2, 1))
- return false;
- return cp_tree_equal (TREE_OPERAND (t1, 0), TREE_OPERAND (t2, 0));
-
case PARM_DECL:
/* For comparing uses of parameters in late-specified return types
with an out-of-class definition of the function, but can also come
--- /dev/null
+// PR c++/81188
+// { dg-do compile { target c++11 } }
+
+template <class F>
+struct C {
+ F fast(long i) const;
+ auto operator[](long i) const -> decltype(this->fast(i));
+};
+
+template <class F>
+auto C<F>::operator[](long i) const -> decltype(this->fast(i)) {
+ return fast(i);
+}