aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/frontend-passes.cc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-01-27 17:17:17 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2025-01-27 17:17:17 +0100
commitf4d772356725ba7fd5e17835607d967d90cdcdaa (patch)
tree52bf25ff97ce3f12c31fdd00c55b89d3f5e47119 /gcc/fortran/frontend-passes.cc
parentad8e6a4ada0a7ed73ac99404ff2b41ed9dc5e940 (diff)
downloadgcc-f4d772356725ba7fd5e17835607d967d90cdcdaa.zip
gcc-f4d772356725ba7fd5e17835607d967d90cdcdaa.tar.gz
gcc-f4d772356725ba7fd5e17835607d967d90cdcdaa.tar.bz2
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 <jakub@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.
Diffstat (limited to 'gcc/fortran/frontend-passes.cc')
0 files changed, 0 insertions, 0 deletions