Message ID | 8baf564b-e742-0b95-c052-53b1082db372@linux.ibm.com |
---|---|
State | Accepted |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp864763vqt; Sun, 16 Jul 2023 19:23:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlEQnjZr7ICmPDGd3RGxPfwbEw/UucccI18FjuSGVYXqL4W84nmOx0OG4Z5rhBJUSOTqGT5K X-Received: by 2002:aa7:cd0e:0:b0:51e:4439:f476 with SMTP id b14-20020aa7cd0e000000b0051e4439f476mr10046937edw.25.1689560605774; Sun, 16 Jul 2023 19:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689560605; cv=none; d=google.com; s=arc-20160816; b=postznEocRRRCc5TO1lHeECoc+ZOX6vNrbUOO1LQN3Zfh1R83+Df46uLwnj7wJkZlU Q5F3JKPvMu+8ksBnm35fNPaIwAyEXzZ+gARxvU5nXCccqHvReA1E0UK+z1603wwVNpLh mfbPeRto7YHP3PMnMgtzfCAeF62crl38+YxMcLjVnM++sciUdiUzfLDkFxlY6kGvYkEI K/G/YkCky8g97gZ6uhLfhw8TGaEeYDZblat0xlhUdME0Y2xjKnRb+VSYXLaDJ8c723xb GItyfHdyePf1YD4XdtrBMgnHRWQMK9gofwvgaSX4vfMyHGonk0iV+vDkDp7aEWj4TWd+ iLmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:subject:cc:to:content-language:user-agent :mime-version:date:message-id:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=5aPVRuJ/TsaB+lXdKQ9O/RJqg4+tLG8KfbFycpDdIP4=; fh=k+Rnxb1DaKaX6LdPbxWtPDbq//hEBHl4Sf6qtdksSDM=; b=GvSoc3fKNAszVtRwE+FmI+6bMghT6T72g5YCopeRh5AX2W2f8MJKxKQmVfZSbRw8kn 65NTnq1cOrtEaf7Bok1kqapK1nbh4ow5JM5/uETAcnIRI5dQPzpHbM3RllIRNrWFki7f k6haJRXakGMBupf3E6wDmSgqAu5h/96k5EW1Wj5+ZPlqgGEFa90kR65fp/pqeJ7fZjsL /wZM47EDgM5rQx4Qr/KfDaGrG5fWF6TFY1Ce/9Vxzh3MHraOVqWaqK2wpO7/duag7JFb hvf2zZC3v+IhycOfHzAVsMJpYqMLBWuS9lWukgxhWDRl6YhlX4ftnTfjVw+me9qlIYEj UtGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BK8MFRFk; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id e24-20020a50ec98000000b0051e0f8aad4bsi13106585edr.120.2023.07.16.19.23.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 16 Jul 2023 19:23:25 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=BK8MFRFk; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9CAE83858439 for <ouuuleilei@gmail.com>; Mon, 17 Jul 2023 02:23:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9CAE83858439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1689560604; bh=5aPVRuJ/TsaB+lXdKQ9O/RJqg4+tLG8KfbFycpDdIP4=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=BK8MFRFk2NpeNjB9f2a1FsOHHKs6Z/t1ryfxgj7Lwe3O3YklzMObLthFicpYJdZv4 d1wF4Le27C2GSlh2zboxLRRe2c5M0Uj5HLn5iH6ycdqb05qY1Yolp+X6xYUVrYeA/d f1wzf9alSL4Kx7S6NOTxrmNtkL3Cg1r1Gx/suYDY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 956493858D1E for <gcc-patches@gcc.gnu.org>; Mon, 17 Jul 2023 02:22:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 956493858D1E Received: from pps.filterd (m0353722.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36H1dVik015610 for <gcc-patches@gcc.gnu.org>; Mon, 17 Jul 2023 02:22:41 GMT Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rvtgx219t-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for <gcc-patches@gcc.gnu.org>; Mon, 17 Jul 2023 02:22:40 +0000 Received: from m0353722.ppops.net (m0353722.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 36H2MecP026265 for <gcc-patches@gcc.gnu.org>; Mon, 17 Jul 2023 02:22:40 GMT Received: from ppma06ams.nl.ibm.com (66.31.33a9.ip4.static.sl-reverse.com [169.51.49.102]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3rvtgx219f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jul 2023 02:22:40 +0000 Received: from pps.filterd (ppma06ams.nl.ibm.com [127.0.0.1]) by ppma06ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 36H2LmcH006923; Mon, 17 Jul 2023 02:22:38 GMT Received: from smtprelay07.fra02v.mail.ibm.com ([9.218.2.229]) by ppma06ams.nl.ibm.com (PPS) with ESMTPS id 3rujqe0wkq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 17 Jul 2023 02:22:38 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay07.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 36H2MaRH61210946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 17 Jul 2023 02:22:36 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EE8FC20049; Mon, 17 Jul 2023 02:22:35 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id EC8DD20043; Mon, 17 Jul 2023 02:22:34 +0000 (GMT) Received: from [9.177.92.246] (unknown [9.177.92.246]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Mon, 17 Jul 2023 02:22:34 +0000 (GMT) Message-ID: <8baf564b-e742-0b95-c052-53b1082db372@linux.ibm.com> Date: Mon, 17 Jul 2023 10:22:32 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Content-Language: en-US To: GCC Patches <gcc-patches@gcc.gnu.org> Cc: Richard Biener <richard.guenther@gmail.com> Subject: [PATCH] vect: Initialize new_temp to avoid false positive warning [PR110652] Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 9xa_jMEBa8lwqmZe3tXTR3ee4Wi7L66p X-Proofpoint-ORIG-GUID: 29Y5jH37ejYRxhxPcR28FK2Tf_LC2kr0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-17_01,2023-07-13_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 suspectscore=0 adultscore=0 phishscore=0 clxscore=1015 spamscore=0 impostorscore=0 mlxlogscore=859 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307170017 X-Spam-Status: No, score=-12.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: "Kewen.Lin via Gcc-patches" <gcc-patches@gcc.gnu.org> Reply-To: "Kewen.Lin" <linkw@linux.ibm.com> Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771632701744269925 X-GMAIL-MSGID: 1771632701744269925 |
Series |
vect: Initialize new_temp to avoid false positive warning [PR110652]
|
|
Checks
Context | Check | Description |
---|---|---|
snail/gcc-patch-check | success | Github commit url |
Commit Message
Kewen.Lin
July 17, 2023, 2:22 a.m. UTC
Hi, As PR110652 and its duplicate PRs show, there could be one build error error: 'new_temp' may be used uninitialized for some build configurations. It's a false positive warning (or error at -Werror), but in order to make the build succeed, this patch is to initialize the reported variable 'new_temp' as NULL_TREE. Confirmed this patch fixed the reported issue in PR110652 (with the same configuration). Is it ok for trunk? BR, Kewen ----- PR tree-optimization/110652 gcc/ChangeLog: * tree-vect-stmts.cc (vectorizable_load): Initialize new_temp as NULL_TREE. --- gcc/tree-vect-stmts.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.31.1
Comments
On Mon, Jul 17, 2023 at 4:22 AM Kewen.Lin <linkw@linux.ibm.com> wrote: > > Hi, > > As PR110652 and its duplicate PRs show, there could be one > build error > > error: 'new_temp' may be used uninitialized > > for some build configurations. It's a false positive warning > (or error at -Werror), but in order to make the build succeed, > this patch is to initialize the reported variable 'new_temp' > as NULL_TREE. > > Confirmed this patch fixed the reported issue in PR110652 > (with the same configuration). > > Is it ok for trunk? OK. > BR, > Kewen > ----- > PR tree-optimization/110652 > > gcc/ChangeLog: > > * tree-vect-stmts.cc (vectorizable_load): Initialize new_temp as > NULL_TREE. > --- > gcc/tree-vect-stmts.cc | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc > index c08d0ef951f..cb86d544313 100644 > --- a/gcc/tree-vect-stmts.cc > +++ b/gcc/tree-vect-stmts.cc > @@ -9297,7 +9297,8 @@ vectorizable_load (vec_info *vinfo, > class loop *containing_loop = gimple_bb (stmt_info->stmt)->loop_father; > bool nested_in_vect_loop = false; > tree elem_type; > - tree new_temp; > + /* Avoid false positive uninitialized warning, see PR110652. */ > + tree new_temp = NULL_TREE; > machine_mode mode; > tree dummy; > tree dataref_ptr = NULL_TREE; > -- > 2.31.1
on 2023/7/17 14:39, Richard Biener wrote: > On Mon, Jul 17, 2023 at 4:22 AM Kewen.Lin <linkw@linux.ibm.com> wrote: >> >> Hi, >> >> As PR110652 and its duplicate PRs show, there could be one >> build error >> >> error: 'new_temp' may be used uninitialized >> >> for some build configurations. It's a false positive warning >> (or error at -Werror), but in order to make the build succeed, >> this patch is to initialize the reported variable 'new_temp' >> as NULL_TREE. >> >> Confirmed this patch fixed the reported issue in PR110652 >> (with the same configuration). >> >> Is it ok for trunk? > > OK. Thanks Richi, pushed as r14-2560. BR, Kewen
diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index c08d0ef951f..cb86d544313 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -9297,7 +9297,8 @@ vectorizable_load (vec_info *vinfo, class loop *containing_loop = gimple_bb (stmt_info->stmt)->loop_father; bool nested_in_vect_loop = false; tree elem_type; - tree new_temp; + /* Avoid false positive uninitialized warning, see PR110652. */ + tree new_temp = NULL_TREE; machine_mode mode; tree dummy; tree dataref_ptr = NULL_TREE;