https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56659
--- Comment #8 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to kapinos from comment #7) > The output of gfortran 10.2.0 was added previously, cf. > > f951: Warning: Include directory ‘./foo/bar’: Permission denied > > f951: internal compiler error: in cpp_diagnostic_at, at libcpp/errors.c:41 I can reproduce this with GCC 7 to 10. But with my patch for PR 100904 (see commit there), this is fixed in GCC 12: f951: Warning: Include directory ‘foo/bar/’: Permission denied <built-in>: Error: foo/bar: Permission denied (The <built-in> shows up when entering a file but the file is not yet there. Not ideal, but not that quick to fix. Once the file is read, that's replaced by the file name and line number. Still, the <built-in> issue should be fixed eventually.)