From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) by sourceware.org (Postfix) with ESMTPS id ADCCF3858D1E for ; Mon, 30 Jan 2023 08:34:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org ADCCF3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 910AB1F86B for ; Mon, 30 Jan 2023 08:34:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1675067679; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=Ijt22FfYJZwb7CzGq6fsR/HcKjcUZ41TeiHGp1WDai4=; b=b5LwncC246jf0Uq8EOS3e4v/WB3yaqMHlAwVhvQ9kzaSaEzijn29rorwWCWm4VjXvlAkFV fg7qExrn3NrJTxyCctJedO8U0YRV+Fc5dHVaXrp1o1JOwtbrWSh6PScGu9DLHkH0JvmCCV lQL3GkxklvV5FNv0io5KmjqD+CTjCY0= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1675067679; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type; bh=Ijt22FfYJZwb7CzGq6fsR/HcKjcUZ41TeiHGp1WDai4=; b=OJrcyWNd3/ru76F8mCGt5LapFpOXd7ynMVr8WopiSAD3yNIDN2X1/w5dvLJwbRBjx5tonM p1AO/IokEntY2xBQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 74B0E13A06 for ; Mon, 30 Jan 2023 08:34:39 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id pypxGx+B12OuUAAAMHmgww (envelope-from ) for ; Mon, 30 Jan 2023 08:34:39 +0000 Date: Mon, 30 Jan 2023 09:34:39 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] ipa/108511 - relax assert for undefined local statics MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Message-Id: <20230130083439.74B0E13A06@imap2.suse-dmz.suse.de> X-Spam-Status: No, score=-11.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR ipa/108511 * cgraph.cc (possibly_call_in_translation_unit_p): Relax assert. --- 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; } -- 2.35.3