From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 9F9A83858C66 for ; Wed, 10 May 2023 08:27:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F9A83858C66 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz 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-out1.suse.de (Postfix) with ESMTPS id AFC2B219FB; Wed, 10 May 2023 08:27:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1683707273; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KuwIe4juyyiU6hhZkPHANq4rWSfrPFk6pvuehCoFH9Y=; b=rYt4qyXDXvjtGZUTBfYGY/MzWHeSMMlO2WjPetr4UC4J+milg5z3xljpeG937w5VvPmv3W wwIObb1OqlIDFAQUSW4VHSztwVUXd7Xos+7uWqKwMQn8z9K98uH2n7Bpem9pqyyTCjkK7e KKNNKl+ggpG87QGIgENFy+QO4VZA1yw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1683707273; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=KuwIe4juyyiU6hhZkPHANq4rWSfrPFk6pvuehCoFH9Y=; b=cHNM+xU1E7LOxLaEF2nbuZ+OwVELOL+3PAg3q+0iI7JpqdZlXFtEZXlg98B2Dh8P8BRFeo gqhCxFluHq7EuuAw== 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 A4EBB13519; Wed, 10 May 2023 08:27:53 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6sM7KIlVW2Q0awAAMHmgww (envelope-from ); Wed, 10 May 2023 08:27:53 +0000 From: Martin Jambor To: Eugene Rozenfeld Cc: "gcc-patches@gcc.gnu.org" Subject: Re: [PATCH] Fixes and workarounds for warnings during autoprofiledbootstrap build In-Reply-To: References: User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Wed, 10 May 2023 10:27:53 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-11.6 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,T_SCC_BODY_TEXT_LINE 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: Hello, On Wed, May 10 2023, Eugene Rozenfeld via Gcc-patches wrote: > autoprofiledbootstrap build produces new warnings since inlining decisions > are different from other builds. This patch contains fixes and workarounds > for those warnings. > > Tested on x86_64-pc-linux-gnu. > > gcc/ChangeLog: > > * config/i386/i386-expand.cc (expand_vec_perm_interleave2): Work around > -Wstringop-overflow false positive during autoprofiledbootstrap > * ipa-devirt.cc (debug_tree_odr_name): Fix for -Wformat-overflow > warning during autoprofiledbootstrap > * lra-eliminations.cc (setup_can_eliminate): Work around > -Wmaybe-uninitialized false positive during autoprofiledbootstrap > * opts-common.cc (candidates_list_and_hint): Work around > -Wstringop-overflow false positive during autoprofiledbootstrap > * tree-ssa-ccp.cc (bit_value_unop): Work around -Wmaybe-uninitialized > false positive during autoprofiledbootstrap > * wide-int.h (wi::copy): Work around -Wmaybe-uninitialized false > positive during autoprofiledbootstrap > --- > gcc/config/i386/i386-expand.cc | 11 +++++++++++ > gcc/ipa-devirt.cc | 3 ++- > gcc/lra-eliminations.cc | 11 +++++++++++ > gcc/opts-common.cc | 1 + > gcc/tree-ssa-ccp.cc | 11 +++++++++++ > gcc/wide-int.h | 11 +++++++++++ > 6 files changed, 47 insertions(+), 1 deletion(-) > [...] > diff --git a/gcc/ipa-devirt.cc b/gcc/ipa-devirt.cc > index 819860258d1..36ea266e834 100644 > --- a/gcc/ipa-devirt.cc > +++ b/gcc/ipa-devirt.cc > @@ -4033,7 +4033,8 @@ debug_tree_odr_name (tree type, bool demangle) > odr = cplus_demangle (odr, opts); > } > > - fprintf (stderr, "%s\n", odr); > + if (odr != NULL) > + fprintf (stderr, "%s\n", odr); > } I cannot find a call to this debug function on trunk. How exactly did this trigger a warning? In any case, IMHO the function should rather print something that makes it clear that an odr name could not be obtained rather than printing nothing. I also think that if we want to handle the case, we should do it before also possibly passing odr to demangler. Thanks, Martin