diff options
author | Jason Merrill <jason@redhat.com> | 2022-03-25 13:13:35 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-03-28 10:57:08 -0400 |
commit | fc50d9a252c89c1bac78192bd0884ff23f2bf48b (patch) | |
tree | 39af0141a157f237413eb184d164565540188dde /gcc/cp/constraint.cc | |
parent | 875342766d42988fa2f8eb7d34ef562ba69e340a (diff) | |
download | gcc-fc50d9a252c89c1bac78192bd0884ff23f2bf48b.zip gcc-fc50d9a252c89c1bac78192bd0884ff23f2bf48b.tar.gz gcc-fc50d9a252c89c1bac78192bd0884ff23f2bf48b.tar.bz2 |
c++: hash table ICE with variadic alias [PR105003]
For PR104008 we thought it might be enough to keep strip_typedefs from
removing this alias template specialization, but this PR demonstrates that
other parts of the compiler also need to know to consider it dependent.
So, this patch changes complex_alias_template_p to no longer consider
template parameters used when their only use appears in a pack expansion,
unless they are the parameter packs being expanded.
To do that I also needed to change it to use cp_walk_tree instead of
for_each_template_parm. It occurs to me that find_template_parameters
should probably also use cp_walk_tree, but I'm not messing with that now.
PR c++/105003
PR c++/104008
PR c++/102869
gcc/cp/ChangeLog:
* pt.cc (complex_alias_template_r): walk_tree callback, replacing
uses_all_template_parms_r, complex_pack_expansion_r.
(complex_alias_template_p): Adjust.
* tree.cc (strip_typedefs): Revert r12-7710 change.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/variadic-alias6.C: New test.
* g++.dg/cpp0x/variadic-alias7.C: New test.
Diffstat (limited to 'gcc/cp/constraint.cc')
0 files changed, 0 insertions, 0 deletions