Message ID | CAPzzfcuQcrsYZ+Ag-xfbVCCx2qzSS1hQgrAuWE8zE6vyb9Xayg@mail.gmail.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp1365970wrt; Wed, 7 Sep 2022 16:21:03 -0700 (PDT) X-Google-Smtp-Source: AA6agR7PtAx/8Z3BK4VuUYL5jCv9mKqilMIFgnlwCd7qxCprfrfxeDmJSDT3wqrKCx8zGQoWXACq X-Received: by 2002:a05:6402:4c9:b0:44d:9921:cb6c with SMTP id n9-20020a05640204c900b0044d9921cb6cmr4932660edw.176.1662592863868; Wed, 07 Sep 2022 16:21:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662592863; cv=none; d=google.com; s=arc-20160816; b=HKAOBdIngtEytVehG8sIeQusnFfUQRjfeeG5vK4m5DJoi9D/2PKLnUcgzkE5urhsPS Bj8ujZII7immDbZq9E1dg/oOmOOt6D1sfFra3Q8TWHNATfNzG7o8JMPPA70B8RFvXCj1 NNDO/JzoY8sAeZKc/vbzszWUzpFbozdwWBaTaTCgsdLy2a8Fm60L+PxWG2ANEn38ihOV uZVHhjcTCvau6Q40R791yG6+f6W6qfczn0oDrYGLifsd8OUkAzIJruFtH5gU68Umibov oR7XuumNqWG+PgvPSRcR085IKkRz/pL+r+kowWa3t2nvH3L28tBK7QJBfvPpTDWpehsL s8Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence:to :subject:message-id:date:mime-version:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=jkLFGmAWzlUTDd5QvP2Ra1yKE5QBJu9jRibbpsgoT1s=; b=FAm9kGEJYfyridGxS6xUzx43Nap/rFw8JcldOVmhGOv4WHoiJR+5koqVfp0ipyO1N2 P/k5lbmomahXxhO7s4xSzapp9/rqYkIFuUnNx9rdxMBOm4E4qjwj5NrA4OHP+qF11lMf o4kiRpSR84XwAqEGT5mQPRwW4L340c48rMI2KRSdKA7BMApV/RSptjaqpccS8OKOFaQI t8so3+MIgFRQvv1bTQXIqRmdSXefONLb3yHOJEJV8C0EANqygwmQtsf8SM+mbDASI//7 e37Xzuz0I0H8fSkpNpdEvWaOmaVS6yU3cwupCflRwd5vojxDd0T0OHrlK2mBlXbC6ANv 7PnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=JC1hgmo0; 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 sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id sc4-20020a1709078a0400b00773b8e3b6a1si480889ejc.805.2022.09.07.16.21.03 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 16:21:03 -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=JC1hgmo0; 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 523D038515C2 for <ouuuleilei@gmail.com>; Wed, 7 Sep 2022 23:21:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 523D038515C2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662592862; bh=jkLFGmAWzlUTDd5QvP2Ra1yKE5QBJu9jRibbpsgoT1s=; h=Date:Subject:To:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=JC1hgmo0PFbcyDzp2OOjdYb1Dr87eclXLcpcs/wMEc65O/F/2oJBypim+CmkXyiXm G0TQtiN9hXyVXboK/pUorjGaiCr2E/YL0kIUAwQb1xSJqAm67jZYS2VR/2vrc6ycd3 ZeMUNGOaWOuqh8qs2xxyJ4g2Se4m9MTDcSqQ7esg= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-vs1-xe34.google.com (mail-vs1-xe34.google.com [IPv6:2607:f8b0:4864:20::e34]) by sourceware.org (Postfix) with ESMTPS id AC0AE3858297 for <gcc-patches@gcc.gnu.org>; Wed, 7 Sep 2022 23:20:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org AC0AE3858297 Received: by mail-vs1-xe34.google.com with SMTP id 67so16531891vsv.2 for <gcc-patches@gcc.gnu.org>; Wed, 07 Sep 2022 16:20:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=jkLFGmAWzlUTDd5QvP2Ra1yKE5QBJu9jRibbpsgoT1s=; b=VWAeGvcItprCIw1zyRQJ7rIkteaJZo5IvmwOXoYzvgxyrVXZSca5Ss9szLMAVr/h59 T/6cW+3UBzuJcgODPMkM2vTwOb1oMvin6pBzZqiC5Klh7Adq2lPq0Zk7FAnESV4Ab89k nn+N0hDxJxy0bU+7SgO3OY8nmJKorGAhzTkfoDHyEK+FIJAN0YTm8x/hLjGXXWoGetDP azkgn3iDGNfBboycKSwD3sK7F0YTvduqZ+muY6h9x/xe39K423tZtRf0zcDntERonK+y O8cIGDq5mYCdcN0RWpS/J5ZIvS8hpWuy57xTxHx9JHZAZqVlTgfYvo3/EyVQU5ZW0mPi M0DQ== X-Gm-Message-State: ACgBeo0niHQVfkAnbHS7aubBySLGCR3cSp4X7WLfYIYl1OJpJ2eRCTSq J0MPyQ0R4vZdeMo6khxrgZYlAK00TLHTKuILg3GGoIiL8Fg= X-Received: by 2002:a67:ca8a:0:b0:398:d6c:8ee1 with SMTP id a10-20020a67ca8a000000b003980d6c8ee1mr1869595vsl.12.1662592818025; Wed, 07 Sep 2022 16:20:18 -0700 (PDT) MIME-Version: 1.0 Date: Thu, 8 Sep 2022 08:20:07 +0900 Message-ID: <CAPzzfcuQcrsYZ+Ag-xfbVCCx2qzSS1hQgrAuWE8zE6vyb9Xayg@mail.gmail.com> Subject: [PATCH] : [gcc/config/rs600/rs6000.cc][Fix typo] Add parentheses for if statement To: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, 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: Akari Takahashi via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Akari Takahashi <akaritakahashioss@gmail.com> Cc: takahashiakari@member.fsf.org 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743354975092601963?= X-GMAIL-MSGID: =?utf-8?q?1743354975092601963?= |
Series |
: [gcc/config/rs600/rs6000.cc][Fix typo] Add parentheses for if statement
|
|
Commit Message
Akari Takahashi
Sept. 7, 2022, 11:20 p.m. UTC
Hello: I am very interested in GCC and have joined the FSF membership. I found a small bug in the latest source code, so I report it. Patch: [Fix typo]Add parentheses for if statement in line 18117. gcc/config/rs600/rs6000.cc Diff: ---------------------------------- return false; ---------------------------------- Takahashi Akari
Comments
Hello: I sent a pull request. Please review and merge. Branch name: patch/rc6000/fixtypo Log: commit d55c6c49e0f7760c0b85ee74eb9c2b4e68275a26 (HEAD -> patch/rc6000/fixtypo) Author: Takahashi Akari <akaritakahashioss@gmail.com> Date: Fri Sep 9 03:37:34 2022 +0900 [Fix typo] Add parentheses for if statement in line 18117. Diff: git diff 30c811f2bac73e63e0b461ba7ed3805b77898798 d55c6c49e0f7760c0b85ee74eb9c2b4e68275a26 diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index a656cb32a47..bcf634a146d 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, HOST_WIDE_INT *offset, HOST_WIDE_INT *size) { rtx addr_rtx; - if MEM_SIZE_KNOWN_P (mem) + if (MEM_SIZE_KNOWN_P (mem)) *size = MEM_SIZE (mem); else return false; Takahashi Akari https://github.com/takahashi-akari GPG Key: 9DD8 F529 83A0 3182 D318 6184 9309 E8D2 2FD4 4365 On Thu, Sep 8, 2022 at 8:20 AM Akari Takahashi <akaritakahashioss@gmail.com> wrote: > > Hello: > I am very interested in GCC and have joined the FSF membership. > I found a small bug in the latest source code, so I report it. > > Patch: > [Fix typo]Add parentheses for if statement in line 18117. > gcc/config/rs600/rs6000.cc > > Diff: > ---------------------------------- > diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc > index bcf634a146d..a656cb32a47 100644 > --- a/gcc/config/rs6000/rs6000.cc > +++ b/gcc/config/rs6000/rs6000.cc > @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, > HOST_WIDE_INT *offset, > HOST_WIDE_INT *size) > { > rtx addr_rtx; > - if (MEM_SIZE_KNOWN_P (mem)) > + if MEM_SIZE_KNOWN_P (mem) > *size = MEM_SIZE (mem); > else > return false; > ---------------------------------- > > Takahashi Akari
Hi! Please cc: the rs6000 maintainers on rs6000 patches. On Thu, Sep 08, 2022 at 08:20:07AM +0900, Akari Takahashi via Gcc-patches wrote: > --- a/gcc/config/rs6000/rs6000.cc > +++ b/gcc/config/rs6000/rs6000.cc > @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, > HOST_WIDE_INT *offset, > HOST_WIDE_INT *size) > { > rtx addr_rtx; > - if (MEM_SIZE_KNOWN_P (mem)) > + if MEM_SIZE_KNOWN_P (mem) > *size = MEM_SIZE (mem); > else > return false; This patch is generated backwards. I committed the following. Thanks! Segher Subject: [PATCH] rs6000: Make an "if" statement more regular As Akari noticed, we have an unusual "if" statement without parentheses around the condition. The condition is a macro that expands to something with parentheses in the right spot, but, let's make the code a little less surprising :-) 2022-09-10 Akari Takahashi <akaritakahashioss@gmail.com> Segher Boessenkool <segher@kernel.crashing.org> * config/rs6000/rs6000.cc (get_memref_parts): Regularize some code. --- gcc/config/rs6000/rs6000.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index a656cb32a472..bcf634a146de 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, HOST_WIDE_INT *offset, HOST_WIDE_INT *size) { rtx addr_rtx; - if MEM_SIZE_KNOWN_P (mem) + if (MEM_SIZE_KNOWN_P (mem)) *size = MEM_SIZE (mem); else return false;
Hi, Segher! I'd like to thank you from the bottom of my heart ! I was happy to see my name listed in the github repository as well. This will motivate me to do my best to commit more to GCC.. :) Best Regards, Takahashi Akari https://github.com/takahashi-akari GPG Key: 9DD8 F529 83A0 3182 D318 6184 9309 E8D2 2FD4 4365 On Sun, Sep 11, 2022 at 12:28 AM Segher Boessenkool <segher@kernel.crashing.org> wrote: > > Hi! > > Please cc: the rs6000 maintainers on rs6000 patches. > > On Thu, Sep 08, 2022 at 08:20:07AM +0900, Akari Takahashi via Gcc-patches wrote: > > --- a/gcc/config/rs6000/rs6000.cc > > +++ b/gcc/config/rs6000/rs6000.cc > > @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, > > HOST_WIDE_INT *offset, > > HOST_WIDE_INT *size) > > { > > rtx addr_rtx; > > - if (MEM_SIZE_KNOWN_P (mem)) > > + if MEM_SIZE_KNOWN_P (mem) > > *size = MEM_SIZE (mem); > > else > > return false; > > This patch is generated backwards. > > I committed the following. Thanks! > > > Segher > > > Subject: [PATCH] rs6000: Make an "if" statement more regular > > As Akari noticed, we have an unusual "if" statement without parentheses > around the condition. The condition is a macro that expands to > something with parentheses in the right spot, but, let's make the code a > little less surprising :-) > > > 2022-09-10 Akari Takahashi <akaritakahashioss@gmail.com> > Segher Boessenkool <segher@kernel.crashing.org> > > * config/rs6000/rs6000.cc (get_memref_parts): Regularize some code. > --- > gcc/config/rs6000/rs6000.cc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc > index a656cb32a472..bcf634a146de 100644 > --- a/gcc/config/rs6000/rs6000.cc > +++ b/gcc/config/rs6000/rs6000.cc > @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, HOST_WIDE_INT *offset, > HOST_WIDE_INT *size) > { > rtx addr_rtx; > - if MEM_SIZE_KNOWN_P (mem) > + if (MEM_SIZE_KNOWN_P (mem)) > *size = MEM_SIZE (mem); > else > return false;
diff --git a/gcc/config/rs6000/rs6000.cc b/gcc/config/rs6000/rs6000.cc index bcf634a146d..a656cb32a47 100644 --- a/gcc/config/rs6000/rs6000.cc +++ b/gcc/config/rs6000/rs6000.cc @@ -18114,7 +18114,7 @@ get_memref_parts (rtx mem, rtx *base, HOST_WIDE_INT *offset, HOST_WIDE_INT *size) { rtx addr_rtx; - if (MEM_SIZE_KNOWN_P (mem)) + if MEM_SIZE_KNOWN_P (mem) *size = MEM_SIZE (mem); else