c++: function NTTP argument in pack considered unused [PR126280]

This is just the pack version of PR c++/105848, in which our non-dependent
call pruning may cause us to not mark an otherwise unused function pointer
template argument within a pack as used.

	PR c++/126280

gcc/cp/ChangeLog:

	* pt.cc (mark_template_arguments_used): Split out loop into ...
	(mark_template_arguments_used_1): ... here. Recurse into
	argument packs.

gcc/testsuite/ChangeLog:

	* g++.dg/template/fn-ptr6.C: New test.

Reviewed-by: Jason Merrill <jason@redhat.com>
2 files changed