From patchwork Wed Mar 3 14:09:03 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 1446666 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=CeBiTec.Uni-Bielefeld.DE header.i=@CeBiTec.Uni-Bielefeld.DE header.a=rsa-sha256 header.s=20200306 header.b=TdgUa3iP; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4DrG886lsdz9sTD for ; Thu, 4 Mar 2021 01:09:11 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C3A473959CB3; Wed, 3 Mar 2021 14:09:07 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id AEA4D3851C1C for ; Wed, 3 Mar 2021 14:09:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org AEA4D3851C1C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=ro@cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 6175DAD99F; Wed, 3 Mar 2021 15:09:04 +0100 (CET) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nv3AYUcFXjCV; Wed, 3 Mar 2021 15:09:04 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p4fddba3f.dip0.t-ipconnect.de [79.221.186.63]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id BCC84ADB86; Wed, 3 Mar 2021 15:09:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1614780543; bh=kZN/4+z+1D9Muz2zgd67QbQZK5dgj0VBDd1IuLRNUVk=; h=From:To:Cc:Subject:Date:From; b=TdgUa3iPqfRTWslScCZSGGL+YQbbUE78XBvA1N0Iowl4ab2rnxoGu5IM+01mDKuA2 iJZMJHip6qEhpq1wz4xY/PX26aIx510l2hLjMfeaxd2LhZL6Nc7HGxTm5T/s8sxLG9 Z4WMJpeqKHN+wTjJ/yHsBrD2EcxwaH67Dv71s3bG4IgnVh+xFIJ8Fxebj1/kO82KqR VXbC1hK1HN67TUZrVVZaS9HLrptothLhqKQ/n9p9nPiLeYv3QwqPt4eqAf/oOSIZv3 wKDcVOgk5T3BPx7G8+n1V010kSVmNTU4fFLWWf5lglJ0SURFbePL+JsteEXE6tjJBl a4gVUpGCBsuKQ== From: Rainer Orth To: gcc-patches@gcc.gnu.org Subject: [PATCH] sparcv9: Disable -Wuninitialized warnings breaking bootstrap [PR92002] Date: Wed, 03 Mar 2021 15:09:03 +0100 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 X-Spam-Status: No, score=-3795.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Eric Botcazou Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" sparcv9 bootstrap has been broken for 1 1/2 years now by spurious -Wuninitialized warnings: In function ‘wide_int wi::max_value(unsigned int, signop)’, inlined from ‘wide_int wi::max_value(unsigned int, signop)’ at /vol/gcc/src/hg/master/local/gcc/wide-int.cc:330:1: /vol/gcc/src/hg/master/local/gcc/wide-int.cc:335:31: error: ‘.generic_wide_int::.wide_int_storage::val[1]’ may be used uninitialized [-Werror=maybe-uninitialized] 335 | return shwi (-1, precision); | ^ [...] In function ‘wide_int get_nonzero_bits(const_tree)’, inlined from ‘wide_int get_nonzero_bits(const_tree)’ at /vol/gcc/src/hg/master/local/gcc/tree-ssanames.c:531:1: /vol/gcc/src/hg/master/local/gcc/tree-ssanames.c:544:67: error: ‘.generic_wide_int::.wide_int_storage::val[1]’ may be used uninitialized [-Werror=maybe-uninitialized] 544 | | (HOST_WIDE_INT) pi->misalign, precision); | ^ [...] Before we ship yet another release with this issue, I suggest to at least include a workaround of demoting them to warnings. Tested on sparcv9-sun-solaris2.11. Ok for master? I originally meant to propose the patch for the gcc-10 branch as well, but when I tried a sparcv9-sun-solaris2.11 bootstrap there some time ago, it wasn't affected any longer. Rainer # HG changeset patch # Parent 710ee5be5a4d126389146bc2e4ab9bbcc36a44e1 Hack around 64-bit SPARC bootstrap failure (PR bootstrap/92002) diff --git a/gcc/config/sparc/t-sparc b/gcc/config/sparc/t-sparc --- a/gcc/config/sparc/t-sparc +++ b/gcc/config/sparc/t-sparc @@ -27,3 +27,7 @@ sparc-c.o: $(srcdir)/config/sparc/sparc- sparc-d.o: $(srcdir)/config/sparc/sparc-d.c $(COMPILE) $< $(POSTCOMPILE) + +# Hack around PR bootstrap/92002. +tree-ssanames.o-warn += -Wno-error=uninitialized -Wno-error=maybe-uninitialized +wide-int.o-warn += -Wno-error=uninitialized -Wno-error=maybe-uninitialized