Commit 5ec1701e by Nathan Sidwell Committed by Nathan Sidwell

re PR c++/81899 (ICE: Segmentation fault)

	PR c++/81899
	* pt.c (instantiate_class_template_1):
	BOUND_TEMPLATE_TEMPLATE_PARM is never friend-injected.

	PR c++/81899
	* g++.dg/template/pr81899.C: New.

From-SVN: r251227
parent 404938ed
2017-08-21 Nathan Sidwell <nathan@acm.org>
PR c++/81899
* pt.c (instantiate_class_template_1):
BOUND_TEMPLATE_TEMPLATE_PARM is never friend-injected.
2017-08-18 David Malcolm <dmalcolm@redhat.com>
PR c++/81514
......
......@@ -10724,7 +10724,8 @@ instantiate_class_template_1 (tree type)
adjust_processing_template_decl = true;
--processing_template_decl;
}
else if (!CLASSTYPE_USE_TEMPLATE (friend_type)
else if (TREE_CODE (friend_type) != BOUND_TEMPLATE_TEMPLATE_PARM
&& !CLASSTYPE_USE_TEMPLATE (friend_type)
&& TYPE_HIDDEN_P (friend_type))
{
/* friend class C;
......
2017-08-21 Nathan Sidwell <nathan@acm.org>
PR c++/81899
* g++.dg/template/pr81899.C: New.
2017-08-21 Richard Biener <rguenther@suse.de>
PR tree-optimization/81900
......
// PR 81899 we tried to treat a bound-tpl-tpl-parm as-if a real record-type
template <template <typename> class FunctorData>
struct functor {
friend FunctorData<int>;
void foo();
};
template <typename> struct data;
template<> void functor<data>::foo();
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