From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id E69373858039 for ; Tue, 14 Sep 2021 15:59:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E69373858039 Received: by mail-pf1-x436.google.com with SMTP id j16so12701967pfc.2 for ; Tue, 14 Sep 2021 08:59:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=0Ux2kGCmgmnEeBzqJRmBER0d2KEsGafknY7QhqtPJcw=; b=dFFJH641tp0LNGniFnC06kXEsHGcEx+fP9/AO+wHtGMlv9VC8yyw0hYC7OWoJxdC6L TEJp8UW/8Wvgb8THwVof+JsuYSe64WhMdGd61hChbiwk9aIcR2OcCZ3Oz+zqwbxCRz3W ZgWzlbeMbiWem6MiGB7C6mr950eHIm08D20v8CoM2lolpJ1teqgjXxEeHiJFbP2WPcWq nsskKHU50/Zkyng8da6ubKqUXwjll8ySAuilcwFq5sFmM96Q8KbXJAVVjSrYZrYDofq6 wGAPo5+6aF6c/TUfcoATviDx7ZznSZzEdXBPYULFDPmSeOPIwVNmhE7zbMjC5Qam4op+ izbA== X-Gm-Message-State: AOAM532SYSlolbzUdbLGohsqr9QJI8S9Doch2UGSiwDk3qNS6k+aVw6p 5/B9VspMFP++3zc+c2lepQr4/Q0zZuo= X-Google-Smtp-Source: ABdhPJzHroXSdqoEhimixx8f9kiIevpcU5jevMdlKNhp9jjdfad4cl/2ZXMcnsLvBr9prwKlCAyGhA== X-Received: by 2002:aa7:8097:0:b029:3cd:b205:cfe9 with SMTP id v23-20020aa780970000b02903cdb205cfe9mr5426339pff.1.1631635184676; Tue, 14 Sep 2021 08:59:44 -0700 (PDT) Received: from [172.31.0.175] (c-98-202-48-222.hsd1.ut.comcast.net. [98.202.48.222]) by smtp.gmail.com with ESMTPSA id q21sm11878691pgk.71.2021.09.14.08.59.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 14 Sep 2021 08:59:44 -0700 (PDT) Subject: Re: Regression with recent change To: Aldy Hernandez , Michael Matz Cc: gcc-patches References: <889cbb03-3a02-65e4-7790-c903293bacf7@gmail.com> <3af2aac4-1b26-ff97-b73a-fa7c086b8dd6@gmail.com> <1ab3ff28-0951-a153-628a-2df37f7a4c77@redhat.com> From: Jeff Law Message-ID: Date: Tue, 14 Sep 2021 09:59:43 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 MIME-Version: 1.0 In-Reply-To: <1ab3ff28-0951-a153-628a-2df37f7a4c77@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , X-List-Received-Date: Tue, 14 Sep 2021 15:59:47 -0000 On 9/14/2021 8:53 AM, Aldy Hernandez wrote: > > > On 9/14/21 4:13 PM, Michael Matz wrote: >> Hello, >> >> On Mon, 13 Sep 2021, Aldy Hernandez via Gcc-patches wrote: >> >> The testcase still tests what it's supposed to test with ... >> >>>> typedef unsigned short uint16_t; >>>> >>>> uint16_t a, b; >>>> >>>> int *j_global; >>>> uint16_t f(void) >>>> { >>>>     int c, **p; >>>>     short d = 2, e = 4; >>>> >> >> ... "c = a;" added here (i.e. it still hangs before the pr55107 change). >> >>>>     for (;; b++) >>>>       { >>>>         int *j = j_global, k = 0; >>>> >>>>         for (; *j; j++) >>>>        { >>>>          for(; c; c++) >>>>            for(; k < 1; k++) >>>>              { >>>>                short *f = &d; >>>> >>>>                if(b) >>>>                  return *f; >>>>              } >>>>        } >>>> >>>>         if(!c) >>>>        d *= e; >>>> >>>>         a = d; >>>>         if ((a ? b = 0 : (**p ? : 1) != (d != 1 ? 1 : (b = 0))) != >>>> ((k ? a >>> : 0) >>>>          < (a * (c = k)))) >>>>        **p = 0; >>>>       } >>>> } >>>> >>> >>> Thanks for getting rid of the noise here. >>> >>> I've simplified the above to show what's going on in the warning on >>> nds32-elf: >>> >>> int george, *global; >>> int stuff(), readme(); >>> >>> int >>> f (void) >>> { >>>     int store; >>> >>>     for (;;) >>>       { >>>         int k = 0; >>> >>>         while (global) >>>          { >>>            for (; store; ++store) >> >> Yeah, that seems a correct warning, your 'store' (the 'c' in the >> original >> testcase) is really used uninitialized (when 'global' aka '*j_global' is >> non-zero).  Sorry for not noticing earlier, I was only getting rid of >> warnings, not carefully looking at the testcase itself.  I think with >> above initialization of 'c' it's conforming, and still a correct test >> for >> the original bug. > > This is good news.  So far, every single warning/problem that has > surfaced with the backward threader rewrite has been a latent bug > elsewhere (or a bad test) :-). Always good news :-) > > Would you mind checking in your changes to the testcase? Yes, please do. jeff