diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-01-20 22:09:22 +1100 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-01-21 09:35:15 +1100 |
commit | 5c0e1879ea639dc527d3928af877d3df985e3f13 (patch) | |
tree | cc5d388755854b27480f19121d34147129f95f28 /gcc/cfgloopmanip.cc | |
parent | 07f62ed9a7b09951f83855e19d41641b098190b1 (diff) | |
download | gcc-5c0e1879ea639dc527d3928af877d3df985e3f13.zip gcc-5c0e1879ea639dc527d3928af877d3df985e3f13.tar.gz gcc-5c0e1879ea639dc527d3928af877d3df985e3f13.tar.bz2 |
c++/modules: Handle mismatching TYPE_CANONICAL when deduping partial specs [PR118101]
In r15-4862 we ensured that merging a partial specialisation would
properly update its TYPE_CANONICAL. However, this confuses the deduping
mechanism, since the canonical type has updated out from under it,
causing is_matching_decl to crash when seeing the equivalent types with
different TYPE_CANONICAL.
This patch solves the issue by forcing structural equality checking for
this case; this way mismatching TYPE_CANONICAL doesn't cause issues, but
we still can handle the case that the types are legitimately different.
PR c++/118101
gcc/cp/ChangeLog:
* module.cc (trees_in::decl_value): Use structural equality when
deduping partial specs with mismatching canonical types.
gcc/testsuite/ChangeLog:
* g++.dg/modules/partial-7.h: New test.
* g++.dg/modules/partial-7_a.C: New test.
* g++.dg/modules/partial-7_b.C: New test.
* g++.dg/modules/partial-7_c.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'gcc/cfgloopmanip.cc')
0 files changed, 0 insertions, 0 deletions