From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id BD7E03858D1E; Wed, 9 Feb 2022 18:28:42 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BD7E03858D1E From: "gscfq@t-online.de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/104471] New: ICE with -nostdinc: NULL directory in find_file Date: Wed, 09 Feb 2022 18:28:42 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gscfq@t-online.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: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Feb 2022 18:28:42 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D104471 Bug ID: 104471 Summary: ICE with -nostdinc: NULL directory in find_file Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gscfq@t-online.de Target Milestone: --- Affects versions down to at least r5 : (related to pr80753 and pr80755) $ cat z1.c #if __has_include () #endif $ gcc-12-20220206 -c z1.c -nostdinc z1.c:1:20: error: no include path in which to search for stdlib.h 1 | #if __has_include () | ^~~~~~~~~~ cc1: internal compiler error: NULL directory in find_file 0x7c8de2 c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level, cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1]) ../../gcc/c-family/c-common.cc:6670 0x1e12599 cpp_error_at(cpp_reader*, cpp_diagnostic_level, unsigned int, char const*, ...) ../../libcpp/errors.cc:302 0x1e17833 _cpp_find_file ../../libcpp/files.cc:516 0x1e18eba _cpp_has_header ../../libcpp/files.cc:2149 0x1e284f7 builtin_has_include ../../libcpp/macro.cc:429 0x1e284f7 _cpp_builtin_macro_text ../../libcpp/macro.cc:677 0x1e28769 builtin_macro ../../libcpp/macro.cc:762 0x1e25e73 enter_macro_context ../../libcpp/macro.cc:1588 0x1e27b60 cpp_get_token_1 ../../libcpp/macro.cc:3018 0x1e149a4 _cpp_parse_expr ../../libcpp/expr.cc:1334 0x1e0eb43 do_if ../../libcpp/directives.cc:2060 0x1e10450 _cpp_handle_directive ../../libcpp/directives.cc:557 0x1e20c88 _cpp_lex_token ../../libcpp/lex.cc:3410 0x1e279ff cpp_get_token_1 ../../libcpp/macro.cc:2930 0x7e553d c_lex_with_flags(tree_node**, unsigned int*, unsigned char*, int) ../../gcc/c-family/c-lex.cc:483 0x74bb81 c_lex_one_token ../../gcc/c/c-parser.cc:279 0x788454 c_parser_peek_token(c_parser*) ../../gcc/c/c-parser.cc:483 0x788454 c_parse_file() ../../gcc/c/c-parser.cc:23317 0x7f7812 c_common_parse_file() ../../gcc/c-family/c-opts.cc:1238=