diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-05-19 22:11:13 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2025-05-20 13:39:47 +1000 |
commit | 870e66a3fcbde185c086f10e63ac1c9fe946e233 (patch) | |
tree | ab6558251ed03eea9040dbe1f8970e49ff4b6edf /libgcc | |
parent | 9de7d374323eea212aa1ffb2208a0c7cfcf46f51 (diff) | |
download | gcc-870e66a3fcbde185c086f10e63ac1c9fe946e233.zip gcc-870e66a3fcbde185c086f10e63ac1c9fe946e233.tar.gz gcc-870e66a3fcbde185c086f10e63ac1c9fe946e233.tar.bz2 |
c++/modules: Ensure vtables are emitted when needed [PR120349]
I missed a testcase in r16-688-gc875748cdc468e for whether a GM vtable
should be emitted in an importer when it has no non-inline key function.
Before that patch the code worked because always we marked all vtables
as DECL_EXTERNAL, which then meant that reading the definition marked
them as DECL_NOT_REALLY_EXTERN.
This patch restores the old behaviour so that vtables are marked
DECL_EXTERNAL (and hence DECL_NOT_REALLY_EXTERN).
PR c++/120349
gcc/cp/ChangeLog:
* module.cc (trees_out::core_bools): Always mark vtables as
DECL_EXTERNAL.
gcc/testsuite/ChangeLog:
* g++.dg/modules/vtt-3_a.C: New test.
* g++.dg/modules/vtt-3_b.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions