https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123622
Bug ID: 123622
Summary: [modules] error on printing missing dependencies when
importing not existing header-unit
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: mtxn at duck dot com
Target Milestone: ---
Created attachment 63356
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63356&action=edit
test-case and proposed patch
* expected result
Print dependencies/imports
* actual result
cc1plus tries to import possibly not existing header-unit,
what results in error when cc1plus checks if CMI exists,
despite "-MG" being specified.
* solving
Check for "-MG" in "preprocess_module" (/gcc/cp/module.cc) fixes the issue,
possible bug-fix included in patch.
Included testcase for dg, but it probably wont be needed.