https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115769
--- Comment #13 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Jakub Jelinek <ja...@gcc.gnu.org>: https://gcc.gnu.org/g:f4d772356725ba7fd5e17835607d967d90cdcdaa commit r15-7231-gf4d772356725ba7fd5e17835607d967d90cdcdaa Author: Jakub Jelinek <ja...@redhat.com> Date: Mon Jan 27 17:17:17 2025 +0100 c++: Handle CWG2867 even in namespace scope structured bindings in header modules [PR115769] The following patch implements the module streaming of the new STATIC_INIT_DECOMP_BASE_P and STATIC_INIT_DECOMP_NONBASE_P flags. As I think namespace scope structured bindings in the header modules will be pretty rare, I've tried to stream something extra only when they actually appear, in that case it streams extra INTEGER_CSTs which mark end of STATIC_INIT_DECOMP_*BASE_P (0), start of STATIC_INIT_DECOMP_BASE_P for static_aggregates (1), start of STATIC_INIT_DECOMP_NONBASE_P for static_aggregates (2) and ditto for tls_aggregates (3 and 4). The patch also copies with just small tweaks the testcases from the namespace scope structured binding CWG2867 patch. 2025-01-27 Jakub Jelinek <ja...@redhat.com> PR c++/115769 gcc/cp/ * module.cc (module_state::write_inits): Verify STATIC_INIT_DECOMP_{,NON}BASE_P flags and stream changes in those out. (module_state::read_inits): Stream those flags in. gcc/testsuite/ * g++.dg/modules/dr2867-1_a.H: New test. * g++.dg/modules/dr2867-1_b.C: New test. * g++.dg/modules/dr2867-2_a.H: New test. * g++.dg/modules/dr2867-2_b.C: New test. * g++.dg/modules/dr2867-3_a.H: New test. * g++.dg/modules/dr2867-3_b.C: New test. * g++.dg/modules/dr2867-4_a.H: New test. * g++.dg/modules/dr2867-4_b.C: New test.