diff options
author | Jason Merrill <jason@redhat.com> | 2022-05-25 12:38:58 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2022-05-25 14:49:18 -0400 |
commit | 34970d08c6297e12f3f9117b6ac19fb2de522e24 (patch) | |
tree | 6ba9da082de8468325cbeb73cf29bac5dd5621d3 /libgcc | |
parent | 850a9ce8bcca59c7efabcdeeca14c5bd905e8363 (diff) | |
download | gcc-34970d08c6297e12f3f9117b6ac19fb2de522e24.zip gcc-34970d08c6297e12f3f9117b6ac19fb2de522e24.tar.gz gcc-34970d08c6297e12f3f9117b6ac19fb2de522e24.tar.bz2 |
c++: CTAD with alias and nested template [PR105655]
Here, alias_ctad_tweaks expect tsubst_decl of a FUNCTION_DECL to return a
FUNCTION_DECL. A reasonable expectation, but in this case we were replacing
the template args of the class-scope deduction guide with equivalent args,
so looking in the hash table we found the partial instantiation stored when
instantiating A<int>, which is a TEMPLATE_DECL. It's fine for that to be
what is stored, but tsubst_function_decl should never return it.
PR c++/105655
gcc/cp/ChangeLog:
* pt.cc (build_template_decl): Add assert.
(tsubst_function_decl): Don't return a template.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/class-deduction-alias13.C: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions