Commit f7af3ad6 by Nathan Sidwell Committed by Nathan Sidwell

[PR c++/84702] ICE with default tmpl arg of overload set

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
parent 53740018
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
......
......@@ -4425,6 +4425,9 @@ process_template_parm (tree list, location_t parm_loc, tree parm,
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
......
// 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 ();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment