aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2025-01-10 10:31:12 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2025-01-10 10:31:12 +0100
commit933f0c20d4ce1dba85e85d9d117cfd9f5376a945 (patch)
tree35a27f85e40df53b24649bbea8277595106f923b /gcc/c
parentf5e488c0ee663c2355e6d712ffc15da215d9cd96 (diff)
downloadgcc-933f0c20d4ce1dba85e85d9d117cfd9f5376a945.zip
gcc-933f0c20d4ce1dba85e85d9d117cfd9f5376a945.tar.gz
gcc-933f0c20d4ce1dba85e85d9d117cfd9f5376a945.tar.bz2
c++: Fix up modules handling of namespace scope structured bindings
With the following patch I actually get a simple namespace scope structured binding working with modules. The core_vals change ensure we actually save/restore DECL_VALUE_EXPR even for namespace scope vars, the get_merge_kind is based on the assumption that structured bindings are always unique, one can't redeclare them and without it we really ICE because their base vars have no name. 2025-01-10 Jakub Jelinek <jakub@redhat.com> * module.cc (trees_out::core_vals): Note DECL_VALUE_EXPR even for vars outside of functions. (trees_in::core_vals): Read in DECL_VALUE_EXPR even for vars outside of functions. (trees_out::get_merge_kind): Make DECL_DECOMPOSITION_P MK_unique. * g++.dg/modules/decomp-2_b.C: New test. * g++.dg/modules/decomp-2_a.H: New file.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions