diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-09-11 22:41:21 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-09-12 11:09:19 +1000 |
commit | ba393bf8879e5cf1f917bd88246d6b80ac081052 (patch) | |
tree | 28fd837dc8418fc836f332f5a509be2347985fc2 /libcpp | |
parent | 51486f081fbc1d7c09503f3341e5ff07a40480de (diff) | |
download | gcc-ba393bf8879e5cf1f917bd88246d6b80ac081052.zip gcc-ba393bf8879e5cf1f917bd88246d6b80ac081052.tar.gz gcc-ba393bf8879e5cf1f917bd88246d6b80ac081052.tar.bz2 |
c++/modules: Really always track partial specialisations [PR116496]
My last fix for this issue (PR c++/114947, r15-810) didn't go far
enough; I had assumed that the issue where we lost track of partial
specialisations we would need to walk again later was limited to
partitions (where we always re-walk all specialisations), but the linked
PR is the same cause but for header units, and it is possible to
construct test cases exposing the same bug just for normal modules.
As such this patch just unconditionally ensures that whenever we modify
DECL_TEMPLATE_SPECIALIZATIONS we also track any partial specialisations
that might have added.
Also clean up a couple of comments and assertions to make expected state
more obvious when processing these specs.
PR c++/116496
gcc/cp/ChangeLog:
* module.cc (trees_in::decl_value): Don't call
set_defining_module_for_partial_spec here.
(depset::hash::add_partial_entities): Clarity assertions.
* pt.cc (add_mergeable_specialization): Always call
set_defining_module_for_partial_spec when adding a partial spec.
gcc/testsuite/ChangeLog:
* g++.dg/modules/partial-5_a.C: New test.
* g++.dg/modules/partial-5_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions