From patchwork Wed Oct 16 16:46:35 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Richard Earnshaw \(lists\)" X-Patchwork-Id: 176515 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp7631245ill; Wed, 16 Oct 2019 09:46:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqzdyomS5HBSTDavPe/DE3T4rC8VKZ/3p2idpwNLtg3FVD4/wYa65ADvcba18LX+05QBo/L1 X-Received: by 2002:a17:906:5fc1:: with SMTP id k1mr41172752ejv.268.1571244414405; Wed, 16 Oct 2019 09:46:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571244414; cv=none; d=google.com; s=arc-20160816; b=piLuJ24vdg/71DZ7FZPrRkYtNDLccKWR3MAiPC6QiNpCL3vIY4M5CzYnvudpcz2Ni3 Qyg5aPaI1pAL4NUNOXsjknom77UQJV9zekp/HF+eV+2TJZbYBnSFCFZE0WotA8saz/iA EnyyNNVmYi+2YytkDr909O1YfGfyb4CB7DP0VPhffyBmxoeo4wqYFYYjLO8pdWrc2klG kahcJ/4CdiKV+Q/lrZl56tY0R/ntCelMwuJuG7Xym8kieIr1YyqfMIJKntDR9El6cC/x k9GG7ERbd88jdEoQnnz9tGb50ptqA+fUJXn+W10n2TuEes9u/Wx/5qveAki/AuFY2sH4 pqFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:user-agent:date:message-id:subject:from:to :delivered-to:sender:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature; bh=j+rmclPHflyoQH32q8YTbiS1ZCUM7mgS8Y5E5MJ3nzw=; b=o0Ma8+3hQl0toiN/Q4YqyUIGJqyL1fw/+Ir+cflw/CD0skOtukujzuW312Gz6/RiNe +vFvWUKo6AbIX1RnFjIAOqORrzmrwPzg61LmCbz1wtDHaJHIFwI7lTSRqDsR13k/TrWK ubkCdfPHFOovvbpaBhuz/55hQhECguudxQ9QByqG3iQEdRhhITgynJAvMG3kERfPf0O/ Xr/LXSwsHVDuBSn2MG9DDWlhxnEsWnI/32YfBf72vv/pHwyB/dilXEUO9+gXeAc5Xw6Q mQoqtrCwDMkqdcniWNb/Kv8cOkFRlDNr1hl0CFabryKaG/PYlvxAg4J7BhijsBVAHDra jBpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YL8PxE8a; spf=pass (google.com: domain of gcc-patches-return-511143-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511143-patch=linaro.org@gcc.gnu.org" Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id s2si15716776ejj.327.2019.10.16.09.46.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Oct 2019 09:46:54 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-return-511143-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=YL8PxE8a; spf=pass (google.com: domain of gcc-patches-return-511143-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="gcc-patches-return-511143-patch=linaro.org@gcc.gnu.org" DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; q=dns; s=default; b=QH3H/Rtm3b96rLjw9gCTt+brt4XJHBYPxBsU7QD9yq2UtAc138 yUgzSvNnen6l3OkQYJicU3D8E+1G2UGMrKgIOyK7s1W/H3r6w7+TDm6mo+Ck8gYc yLRqhNx6kPQXhQYZEaIsYVXl1PR9O9bzT/YVUgcYAMtiIpqGPdganp2ow= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:message-id:date:mime-version:content-type; s= default; bh=pTSoZQ4atp4jhFFUJIkrW6ECJbY=; b=YL8PxE8abMRdUbEXWS+C MbAQ7UPc1HvPhOWHNmqxbfrl6hvPVlovuJOascP/4rGguVZx7XpCEtr/0tB8IU70 0bR2/CL88FaXN046KYKuAEzotZpQz4FPqYjKNW9CTJEdyX0VKV3Gfh6kuawuLTRj axDLk45EJ2VOaYA4XXUeQ6Q= Received: (qmail 2817 invoked by alias); 16 Oct 2019 16:46:40 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 2806 invoked by uid 89); 16 Oct 2019 16:46:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=HX-Languages-Length:874, arm.c, armc, UD:arm.c X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 Oct 2019 16:46:39 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 461D828; Wed, 16 Oct 2019 09:46:37 -0700 (PDT) Received: from e120077-lin.cambridge.arm.com (e120077-lin.cambridge.arm.com [10.2.206.225]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AAA2F3F6C4; Wed, 16 Oct 2019 09:46:36 -0700 (PDT) To: "gcc-patches@gcc.gnu.org" From: "Richard Earnshaw (lists)" Subject: [arm] fix bootstrap failure due to uninitialized warning Message-ID: Date: Wed, 16 Oct 2019 17:46:35 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 The Arm port is failing bootstrap because GCC is now warning about an unitialized array. The code is complex enough that I certainly can't be sure the compiler is wrong, so perhaps the best fix here is just to memset the entire array before use. * config/arm/arm.c (neon_valid_immediate): Clear bytes before use. Applied to trunk. diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 9f0975dc071..75a011029f1 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -12243,7 +12252,7 @@ neon_valid_immediate (rtx op, machine_mode mode, int inverse, unsigned int i, elsize = 0, idx = 0, n_elts; unsigned int innersize; - unsigned char bytes[16]; + unsigned char bytes[16] = {}; int immtype = -1, matches; unsigned int invmask = inverse ? 0xff : 0; bool vector = GET_CODE (op) == CONST_VECTOR;