c++: Propagate using decls from partitions [PR114868]
commit0d0215b10dbbe39d655ceda4af283f288ec7680c
authorNathaniel Shead <nathanieloshead@gmail.com>
Tue, 9 Apr 2024 11:49:58 +0000 (9 21:49 +1000)
committerNathaniel Shead <nathanieloshead@gmail.com>
Wed, 1 May 2024 05:58:42 +0000 (1 15:58 +1000)
treea83c9164957d443ee6522efb159b04f8bb9ebef5
parent79420dd344145819677b3f975bb305a778fcaf91
c++: Propagate using decls from partitions [PR114868]

The modules code currently neglects to set OVL_USING_P on the dependency
created for a using-decl, which causes it not to remember that the
OVL_EXPORT_P flag had been set on it when emitted from the primary
interface unit. This patch ensures that it occurs.

PR c++/114868

gcc/cp/ChangeLog:

* module.cc (depset::hash::add_binding_entity): Propagate
OVL_USING_P for using-declarations.

gcc/testsuite/ChangeLog:

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

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