From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 40006385C32E; Mon, 31 Oct 2022 09:46:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 40006385C32E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667209570; bh=XW5rhgVNdoWHmy60gCmwBT1pDSAh2+yaW6uOv8Q28uk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QjxeoCE8b6YsJaP8ymDUzZrcAH6TXWyAigRHLZkX44DcIg+kXJWF2GhnYvkvSz7fW ZKHBZ9eDzPU1EOjvOSPCkG/Or0ck2iKntA3LuaqXKRLbe/8mGj7832BPZCIEWU27pZ DIv2rzvcL1UhKpShUKfPJOv97iXCxaBCzH6bIQaw= From: "helmut at subdivi dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/80755] __has_include_next: internal compiler error: NULL directory in find_file Date: Mon, 31 Oct 2022 09:46:07 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: preprocessor X-Bugzilla-Version: unknown X-Bugzilla-Keywords: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: helmut at subdivi dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D80755 Helmut Grohne changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |helmut at subdivi dot de --- Comment #2 from Helmut Grohne --- Created attachment 53801 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D53801&action=3Dedit proposed fix I confirm the issue on gcc 12.2.0-3 on Debian and have seen it since at lea= st 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 f= or 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 obvio= us. This problem now affects toolchain bootstrap on Debian for hurd architectur= es. The stage1 preprocessor happens to run into this very early.=