https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116291
Nathaniel Shead <nshead at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nshead at gcc dot gnu.org Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED Target Milestone|--- |15.0 --- Comment #1 from Nathaniel Shead <nshead at gcc dot gnu.org> --- This looks to have been fixed by r15-3207-g215ff991a8681f: commit 215ff991a8681f968823b913e1c79a32d339c097 Author: Nathaniel Shead <nathanielosh...@gmail.com> Date: Thu Aug 22 20:41:54 2024 +1000 c++/modules: Fix include translation for already-seen headers [PR99243] After importing a header unit we learn about and setup any header modules that we transitively depend on. However, this causes 'set_filename' to fail an assertion if we then come across this header as an #include and attempt to translate it into a module. We still need to do this translation so that libcpp learns that this is a header unit, but we shouldn't error just because we've already seen it as an import. Instead this patch merely checks and errors to handle the case of a broken mapper implementation which supplies a different CMI path from the one we already got. As a drive-by fix, also make failing to find the CMI for a module be a fatal error: any further errors in the TU are unlikely to be helpful. So closing.