From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 731CD3858407; Mon, 30 Jan 2023 08:35:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 731CD3858407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675067725; bh=7skatMfcQp+nMp63HSFWlAYRy6gToEd/MTtTIGhlxLY=; h=From:To:Subject:Date:From; b=obHyhLfRwsXGfEt6OOBb2pfs6lH6TaizrsM0lYNr+KZCZ+koZp93Th9J3WglPOqmr eks5zD+hNw/WF8PF6kfIkUftxKF8yzbZ9A661WFqWPZ+RNkh6l+U3Ia9Eg5I/jkHEf PRDbrNcSUnAxyVcgvTYJvhI0KragaxfTOV/g1u5Q= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-5489] ipa/108511 - relax assert for undefined local statics X-Act-Checkin: gcc X-Git-Author: Richard Biener X-Git-Refname: refs/heads/master X-Git-Oldrev: 29ecb952d8c5ee4c6affa113dc47f56d95371961 X-Git-Newrev: 4c17371dc5a1193671e5a475349fa7d7a6f0ca1c Message-Id: <20230130083525.731CD3858407@sourceware.org> Date: Mon, 30 Jan 2023 08:35:25 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4c17371dc5a1193671e5a475349fa7d7a6f0ca1c commit r13-5489-g4c17371dc5a1193671e5a475349fa7d7a6f0ca1c Author: Richard Biener Date: Mon Jan 30 08:20:03 2023 +0100 ipa/108511 - relax assert for undefined local statics Since we no longer promote undefined local statics extern the assert in possibly_call_in_translation_unit_p triggers. The following relaxes it according to Honzas advice. PR ipa/108511 * cgraph.cc (possibly_call_in_translation_unit_p): Relax assert. Diff: --- gcc/cgraph.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/cgraph.cc b/gcc/cgraph.cc index b810237c919..06bc980fa52 100644 --- a/gcc/cgraph.cc +++ b/gcc/cgraph.cc @@ -4183,7 +4183,7 @@ cgraph_edge::possibly_call_in_translation_unit_p (void) node = node->previous_sharing_asm_name; if (node->previous_sharing_asm_name) node = symtab_node::get_for_asmname (DECL_ASSEMBLER_NAME (callee->decl)); - gcc_assert (TREE_PUBLIC (node->decl)); + gcc_assert (TREE_PUBLIC (node->decl) || DECL_EXTERNAL (node->decl)); return node->get_availability () >= AVAIL_INTERPOSABLE; }