From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) by sourceware.org (Postfix) with ESMTPS id 03FAF385AC29 for ; Fri, 23 Sep 2022 15:35:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 03FAF385AC29 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x635.google.com with SMTP id lh5so1451665ejb.10 for ; Fri, 23 Sep 2022 08:35:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=4ABLZfwcMeQ2DOuhxO8PBuoLzE44wWw36DxOBnUIKdw=; b=gTDFRXLsmEXl0pde5ov4s2XxBLGmJiIgpy0AsaMXoamYlzfKLOoNLqGT8dQTWtJdJ3 +UBaMFXAiyw7uD0r/tYgo41ic8kahhe8w0+qGlJ5CSKAYd6SdpjAMdrkPKOopdYcf2mq L68qA8b0x5YjqdIp/b20grYd/AhdiPSzGHR+btBg3Bl+fNsEa8y1utEr8Aez+M2sADAd 6logUKTEcNjhT7HFWTH4MnDY1vNJVmnwPJQwDIoRBrNMCit0CAoKKyYhoFruqlEC81jE OGqRNv/WhGgEYSRXBSOC8TkhmWuWYw0emk/k3h/GazG7jZ/Km7WRigcz008YpzArPUmT hk5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=4ABLZfwcMeQ2DOuhxO8PBuoLzE44wWw36DxOBnUIKdw=; b=28izXrJgD0hdIBG1MoU8VBm7BtEdvfRYNuy3z+fF5zvXmDlLTJVzm1o0X2UqgFYNdh NT3uFCz4380um0tMk3A+TR4qe4Q2h5fPSQbEwTxnOO7bpz0EGWl6QJWts2hyQtklfmfG GIu+fCndZPTU6sq5nEIt8feepOtuyIeY8PLTOUHo8B8BN0+e3btpWUo7TxTT/IZeR4s/ JwX8CCcnn8a4WJl/M/6CJXHCxdW3yVgfv0z5nAO74FX9MEIoxofTD6VlBYFmLMEE5nDJ /DuhN3FZyjuc8ZQlRSamBOnNCNOfJHGMtYSY79pg8aXj/VZwsflroOhphKsvNHvgL8hI /0ew== X-Gm-Message-State: ACrzQf2ofyholz87X9l6GAzCKxpF3wkOUnfap7eVe/QSBv6tRkFAxiIN d5bmr8vCYp7240exrjkZBATSGDdDTsJW9PiwSRU= X-Google-Smtp-Source: AMsMyM6a03IrphI3bx9m2gocLt3PQrPRHmotlU+CaWsa339t/EvsUmhDfP7Bj9bSpMP7zSSuGX+Uzpa66mbwNFhvr24= X-Received: by 2002:a17:907:1c20:b0:781:c7fc:518e with SMTP id nc32-20020a1709071c2000b00781c7fc518emr7554294ejc.309.1663947350674; Fri, 23 Sep 2022 08:35:50 -0700 (PDT) MIME-Version: 1.0 References: <20220917005949.263893-1-juzhe.zhong@rivai.ai> In-Reply-To: <20220917005949.263893-1-juzhe.zhong@rivai.ai> From: Kito Cheng Date: Fri, 23 Sep 2022 23:35:38 +0800 Message-ID: Subject: Re: [PATCH] RISC-V: Suppress riscv-selftests.cc warning. To: juzhe.zhong@rivai.ai Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,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: Committed, but squashed changes to "RISC-V: Support poly move manipulation and selftests." instead of a standalone commit. On Sat, Sep 17, 2022 at 9:00 AM wrote: > > From: Ju-Zhe Zhong > > This patch is a fix patch for: > https://gcc.gnu.org/pipermail/gcc-patches/2022-September/601643.html > > Suppress the warning as follows: > > ../../../riscv-gcc/gcc/poly-int.h: In function > =E2=80=98poly_int64 eval_value(rtx, std::map&)=E2= =80=99: > ../../../riscv-gcc/gcc/poly-int.h:845:48: warning: > =E2=80=98*((void*)& op2_val +8)=E2=80=99 may be used uninitialized > in this function [-Wmaybe-uninitialized] > POLY_SET_COEFF (C, r, i, NCa (a.coeffs[i]) + b.coeffs[i]); > ^ > ../../../riscv-gcc/gcc/config/riscv/riscv-selftests.cc:74:23: > note: =E2=80=98*((void*)& op2_val +8)=E2=80=99 was declared here > poly_int64 op1_val, op2_val; > > gcc/ChangeLog: > > * config/riscv/riscv-selftests.cc (eval_value): Add initial value= . > > --- > gcc/config/riscv/riscv-selftests.cc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/config/riscv/riscv-selftests.cc b/gcc/config/riscv/riscv= -selftests.cc > index 167cd47c880..490b6ed6b8e 100644 > --- a/gcc/config/riscv/riscv-selftests.cc > +++ b/gcc/config/riscv/riscv-selftests.cc > @@ -71,7 +71,8 @@ eval_value (rtx x, std::map ®no_to_rt= x) > unsigned regno =3D REGNO (x); > expr =3D regno_to_rtx[regno]; > > - poly_int64 op1_val, op2_val; > + poly_int64 op1_val =3D 0; > + poly_int64 op2_val =3D 0; > if (UNARY_P (expr)) > { > op1_val =3D eval_value (XEXP (expr, 0), regno_to_rtx); > -- > 2.36.1 >