Commit 46b48ef5 by Jason Merrill Committed by Jason Merrill

PR c++/41727 - ICE with partial spec of partial instantiation

	* pt.c (process_partial_specialization): For now, don't check more
	specialized if there is more than one level of args.

From-SVN: r245642
parent a232a1cb
2017-02-21 Jason Merrill <jason@redhat.com>
PR c++/41727 - ICE with partial spec of partial instantiation
* pt.c (process_partial_specialization): For now, don't check more
specialized if there is more than one level of args.
2017-02-21 Marek Polacek <polacek@redhat.com>
PR c++/79535
......
......@@ -4619,6 +4619,9 @@ process_partial_specialization (tree decl)
/* If we aren't in a dependent class, we can actually try deduction. */
else if (tpd.level == 1
/* FIXME we should be able to handle a partial specialization of a
partial instantiation, but currently we can't (c++/41727). */
&& TMPL_ARGS_DEPTH (specargs) == 1
&& !get_partial_spec_bindings (maintmpl, maintmpl, specargs))
{
if (permerror (input_location, "partial specialization %qD is not "
......
// PR c++/41727
struct tag0;
template < class Tag > struct outer
{
template < typename Arg0, typename Arg1 > struct inner;
};
template < int Value > struct value_wrap { };
template </* class Tag */>
template < typename Arg0, int Arg1 >
struct outer <tag0 >::inner < Arg0, value_wrap < Arg1 > >
{
typedef Arg0 type;
};
typedef outer < tag0 >
::inner < tag0, value_wrap < 999 > >
::type // { dg-bogus "incomplete" "" { xfail *-*-* } }
outer_inner_type;
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