c++/modules: fix -MG for header units [PR123622]

With -MG we should allow a nonexistent header unit, as we do with a
nonexistent #include.  But still import it if available.

	PR c++/123622

gcc/cp/ChangeLog:

	* module.cc (preprocess_module): Check deps.missing_files.

gcc/testsuite/ChangeLog:

	* g++.dg/modules/dep-6.C: New test.

Co-authored-by: <mtxn@duck.com>
2 files changed