https://gcc.gnu.org/ml/gcc-patches/2018-03/msg00227.html
PR c++/84702
* pt.c (process_template_arg): Mark lookup_keep on a default arg.
PR c++/84702
* g++.dg/lookup/pr84702.C: New.
From-SVN: r258258
+2018-03-05 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84702
+ * pt.c (process_template_arg): Mark lookup_keep on a default arg.
+
2018-03-05 Marek Polacek <polacek@redhat.com>
PR c++/84707
pushdecl (decl);
+ if (defval && TREE_CODE (defval) == OVERLOAD)
+ lookup_keep (defval, true);
+
/* Build the parameter node linking the parameter declaration,
its default argument (if any), and its constraints (if any). */
parm = build_tree_list (defval, parm);
+2018-03-05 Nathan Sidwell <nathan@acm.org>
+
+ PR c++/84702
+ * g++.dg/lookup/pr84702.C: New.
+
2018-03-05 Jakub Jelinek <jakub@redhat.com>
PR target/84564
--- /dev/null
+// PR c++/84702 failure to mark overload to keep
+// { dg-do compile { target c++11 } }
+
+void a ();
+
+namespace {
+ void a (int);
+}
+
+template<void (&b)() = a>
+void c () {
+ c ();
+}