]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++/modules: Fix stream-in of member using-decls [PR120414]
authorNathaniel Shead <nathanieloshead@gmail.com>
Fri, 23 May 2025 14:51:49 +0000 (00:51 +1000)
committerNathaniel Shead <nathanieloshead@gmail.com>
Fri, 23 May 2025 22:54:32 +0000 (08:54 +1000)
commit43dddeef7a870ce4db7407f73660504b67a0a919
tree63d52fd82a3eed53db2c5d5520bb255ce1c4c0a9
parenta2681eb403928c69d8dddfea6f1de25f57f1f3ac
c++/modules: Fix stream-in of member using-decls [PR120414]

When streaming in a reference to a data member, we have an oversight
where we did not consider USING_DECLs, despite otherwise handling them
here the same as fields.  This patch corrects that mistake.

PR c++/120414

gcc/cp/ChangeLog:

* module.cc (trees_in::tree_node): Allow reading a USING_DECL
when streaming tt_data_member.

gcc/testsuite/ChangeLog:

* g++.dg/modules/using-31_a.C: New test.
* g++.dg/modules/using-31_b.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
gcc/cp/module.cc
gcc/testsuite/g++.dg/modules/using-31_a.C [new file with mode: 0644]
gcc/testsuite/g++.dg/modules/using-31_b.C [new file with mode: 0644]