diff options
author | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-07-08 22:25:17 +1000 |
---|---|---|
committer | Nathaniel Shead <nathanieloshead@gmail.com> | 2024-07-17 11:23:23 +1000 |
commit | 5fad0b552c5851fb6ae6eb3616e50cc25af1391d (patch) | |
tree | 37ce67b58cb5af20572a32d4843bc8a6de67ea8c /libvtv | |
parent | 4039c7473a60d61468bef7a1aee4d8bce741f4ec (diff) | |
download | gcc-releases/gcc-14.zip gcc-releases/gcc-14.tar.gz gcc-releases/gcc-14.tar.bz2 |
c++/modules: Propagate BINDING_VECTOR_*_DUPS_P on realloc [PR99242]releases/gcc-14
When importing modules, when a binding vector for a name runs out of
slots it gets reallocated with a larger size, and existing bindings are
copied across. However, the flags to indicate whether deduping needs to
occur did not: this causes ICEs, as it allows a duplicate binding to be
added which then violates assumptions later on.
PR c++/99242
gcc/cp/ChangeLog:
* name-lookup.cc (append_imported_binding_slot): Propagate dups
flags.
gcc/testsuite/ChangeLog:
* g++.dg/modules/pr99242_a.H: New test.
* g++.dg/modules/pr99242_b.H: New test.
* g++.dg/modules/pr99242_c.H: New test.
* g++.dg/modules/pr99242_d.C: New test.
Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
(cherry picked from commit 1aa0f1627857c3e2d90982bdb07ca78ca10b26f3)
Diffstat (limited to 'libvtv')
0 files changed, 0 insertions, 0 deletions