https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123879
--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The trunk branch has been updated by Jason Merrill <[email protected]>: https://gcc.gnu.org/g:446ed8b4edce048da7201f3f8cd4dbfcce67fb34 commit r16-8790-g446ed8b4edce048da7201f3f8cd4dbfcce67fb34 Author: Jason Merrill <[email protected]> Date: Tue Apr 21 16:23:37 2026 -0400 c++: #include rewrite and installed compiler [PR123879] In an installed compiler, the pathname in the expanded_location might be canonicalized while the pathname in the cpp_dir is not, e.g. eloc.file is ".../include/c++/16.0.1/stdbit.h" while dir->name is ".../lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1". So let's use lrealpath to compare canonical paths for both. And filename_ncmp, while we're at it. PR c++/123879 gcc/cp/ChangeLog: * module.cc (maybe_translate_include): Use lrealpath in check whether we're including something in the same directory.
