commit 460a34462cd0dd2787e1ffddf4b08d1c36ff5557
Author: Jason Merrill <jason@redhat.com>
Date: Wed Apr 24 11:30:03 2013 -0400
PR c++/53721
* parser.c (cp_parser_postfix_dot_deref_expression): Fix thinko.
@@ -6155,7 +6155,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser,
/* Unlike the object expression in other contexts, *this is not
required to be of complete type for purposes of class member
access (5.2.5) outside the member function body. */
- else if (scope != current_class_ref
+ else if (postfix_expression != current_class_ref
&& !(processing_template_decl && scope == current_class_type))
scope = complete_type_or_else (scope, NULL_TREE);
/* Let the name lookup machinery know that we are processing a
new file mode 100644
@@ -0,0 +1,10 @@
+// PR c++/53721
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ void f() {};
+ auto g() -> decltype(this->f())
+ {
+ }
+};