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.