diff options
author | Patrick Palka <ppalka@redhat.com> | 2024-06-25 12:59:24 -0400 |
---|---|---|
committer | Patrick Palka <ppalka@redhat.com> | 2024-06-25 12:59:24 -0400 |
commit | 06ebb7c6f31fe42ffdea6f51ac1ba1f6b058c090 (patch) | |
tree | 706ad45a537866f2bfce4b258097f7e7732588d5 /gcc/dwarf2codeview.h | |
parent | e3915c1ad56591cbd68229a64c941c38330abd69 (diff) | |
download | gcc-06ebb7c6f31fe42ffdea6f51ac1ba1f6b058c090.zip gcc-06ebb7c6f31fe42ffdea6f51ac1ba1f6b058c090.tar.gz gcc-06ebb7c6f31fe42ffdea6f51ac1ba1f6b058c090.tar.bz2 |
c++: alias CTAD and copy deduction guide [PR115198]
Here we're neglecting to update DECL_NAME during the alias CTAD guide
transformation, which causes copy_guide_p to return false for the
transformed copy deduction guide since DECL_NAME is still __dguide_C
with TREE_TYPE C<B, T> but it should be __dguide_A with TREE_TYPE A<T>
(i.e. C<false, T>). This ultimately results in ambiguity during
overload resolution between the copy deduction guide vs copy ctor guide.
This patch makes us update DECL_NAME of a transformed guide accordingly
during alias/inherited CTAD.
PR c++/115198
gcc/cp/ChangeLog:
* pt.cc (alias_ctad_tweaks): Update DECL_NAME of the transformed
guides.
gcc/testsuite/ChangeLog:
* g++.dg/cpp2a/class-deduction-alias22.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'gcc/dwarf2codeview.h')
0 files changed, 0 insertions, 0 deletions