[Bug preprocessor/80755] __has_include_next: internal compiler error: NULL directory in find_file
helmut at subdivi dot de
gcc-bugzilla@gcc.gnu.org
Mon Oct 31 09:46:07 GMT 2022
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80755
Helmut Grohne <helmut at subdivi dot de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |helmut at subdivi dot de
--- Comment #2 from Helmut Grohne <helmut at subdivi dot de> ---
Created attachment 53801
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53801&action=edit
proposed fix
I confirm the issue on gcc 12.2.0-3 on Debian and have seen it since at least
version 11. The symptom is slightly different though. It no longer produces an
ICE. Instead the output looks like this:
lastincdir/testcase.h:1:24: error: no include path in which to search for
doesnotexist.h
...
(null):0: confused by earlier errors, bailing out
The invocation terminates with status 1.
While this no longer is an ICE, the behavior is not correct either.
__has_include_next should not error out and return false-ish instead.
I believe that looking at the attached patch makes the problem fairly obvious.
This problem now affects toolchain bootstrap on Debian for hurd architectures.
The stage1 preprocessor happens to run into this very early.
More information about the Gcc-bugs
mailing list