c++/modules: Mark implicit inline namespaces as purview [PR121724]

When we push an existing namespace within the module purview for the
first time, we also need to mark any parent inline namespaces as purview
to not confuse the streaming logic.

	PR c++/121724

gcc/cp/ChangeLog:

	* name-lookup.cc (push_namespace): Mark inline namespace
	contexts as purview if needed.

gcc/testsuite/ChangeLog:

	* g++.dg/modules/namespace-12_a.C: New test.
	* g++.dg/modules/namespace-12_b.C: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
(cherry picked from commit 03505e5b93e635907ed5ef7edac11da4026655e2)
3 files changed