Implicit constexpr makes the use of x disappear, avoiding the exposure and
thus the diagnostic.
gcc/testsuite/ChangeLog:
* g++.dg/modules/internal-17_b.C: Add -fno-implicit-constexpr.
// PR c++/121576
-// { dg-additional-options "-fmodules -Wno-error=expose-global-module-tu-local -Wtemplate-names-tu-local -Wno-global-module" }
+// { dg-additional-options "-fmodules -Wno-error=expose-global-module-tu-local -Wtemplate-names-tu-local -Wno-global-module -fno-implicit-constexpr" }
// { dg-module-cmi !X }
module;