+2017-02-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/79420
+ PR c++/79463
+ * parser.c (cp_parser_postfix_dot_deref_expression): Avoid
+ clobbering if the postfix expression isn't an EXPR_P.
+
2017-02-13 Jason Merrill <jason@redhat.com>
PR c++/79461 - ICE with lambda in constexpr constructor
(scope, current_class_type))))
{
scope = complete_type (scope);
- if (!COMPLETE_TYPE_P (scope))
+ if (!COMPLETE_TYPE_P (scope)
+ /* Avoid clobbering e.g. OVERLOADs or DECLs. */
+ && EXPR_P (postfix_expression))
{
/* In a template, be permissive by treating an object expression
of incomplete type as dependent (after a pedwarn). */
+2017-02-14 Marek Polacek <polacek@redhat.com>
+
+ PR c++/79420
+ PR c++/79463
+ * g++.dg/cpp1y/pr79463.C: New.
+ * g++.dg/template/incomplete10.C: New.
+ * g++.dg/template/incomplete9.C: New.
+
2017-02-14 H.J. Lu <hongjiu.lu@intel.com>
PR target/79498
--- /dev/null
+// PR c++/79463
+// { dg-options "-g" }
+// { dg-do compile { target c++14 } }
+
+struct A;
+extern A a; // { dg-error "'a' has incomplete type" }
+template < int > int f = a.x;
--- /dev/null
+// PR c++/79420
+
+struct S;
+extern S s; // { dg-error "'s' has incomplete type" }
+template<int> int f ()
+{
+ return s.x;
+}
+
+void g ()
+{
+ f<0> ();
+}
--- /dev/null
+// PR c++/79420
+
+template<int> int f ()
+{
+ return f.x; // { dg-error "overloaded function with no contextual type information" }
+}
+
+void g ()
+{
+ f<0> ();
+}