Commit 001db6cf by Jason Merrill Committed by Jason Merrill

PR c++/85006 - -fconcepts ICE with A<auto...> return type

	* pt.c (tsubst_pack_expansion): Allow unsubstituted auto pack.

From-SVN: r259100
parent 8859913e
2018-04-04 Jason Merrill <jason@redhat.com> 2018-04-04 Jason Merrill <jason@redhat.com>
PR c++/85006 - -fconcepts ICE with A<auto...> return type
* pt.c (tsubst_pack_expansion): Allow unsubstituted auto pack.
PR c++/85200 - ICE with constexpr if in generic lambda. PR c++/85200 - ICE with constexpr if in generic lambda.
* tree.c (cp_walk_subtrees): Walk into DECL_EXPR in templates. * tree.c (cp_walk_subtrees): Walk into DECL_EXPR in templates.
......
...@@ -11860,7 +11860,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain, ...@@ -11860,7 +11860,7 @@ tsubst_pack_expansion (tree t, tree args, tsubst_flags_t complain,
/* We can't substitute for this parameter pack. We use a flag as /* We can't substitute for this parameter pack. We use a flag as
well as the missing_level counter because function parameter well as the missing_level counter because function parameter
packs don't have a level. */ packs don't have a level. */
gcc_assert (processing_template_decl); gcc_assert (processing_template_decl || is_auto (parm_pack));
unsubstituted_packs = true; unsubstituted_packs = true;
} }
} }
......
// PR c++/85006
// { dg-additional-options "-std=c++17 -fconcepts" }
template<typename... Ts> struct A {};
template<typename... Us> A<auto...> foo() { return A{}; }
void bar()
{
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