From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 2E14C3858C60 for ; Mon, 13 Sep 2021 14:33:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E14C3858C60 Received: by mail-pj1-x102e.google.com with SMTP id n13-20020a17090a4e0d00b0017946980d8dso6694061pjh.5 for ; Mon, 13 Sep 2021 07:33:14 -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=PwzCLc/fVE81m7oYFs2pr4gTaFnXXnm1E6ST81gxLxc=; b=EeqSbyd4OeOmKGxdol4NVT2Eb5h+ElldIRC1QFHYX7dywUhJ5s/78THRuLxFbTfp/d bjwM6xmI1TlJ4Kv4tCLLRiasSHClmgm/BTy6Pu4txXHJ50etgM2AKhPGZhgzVumDzq+r 1o4KIRCj4n48NC5sYo7hz9so+Dx2Sp0g0qQ+xWUuF8iI38eq+pD/dMhcBR+wdCBs7pq6 Ho8sFhdicYyoFAoqryS/YqHiyZJNB3ZU9htYWbs6a8TZerOdOA7ihgCqhVOspqdDiw+k Waf1GxCPUFmSydUBNorJWqbI44mI+vRAtB3JEQS3ub2Y98qAAjD70MqJTco1Vdxdy0uB RlqA== X-Gm-Message-State: AOAM530MA/1E/aElLSLJAiNs3zRTnCAlUWJNHIr3wazm0GMW4GjWPySU /0ZE0FEOzHvv7Uptt2n27zBLZ5rqg0g= X-Google-Smtp-Source: ABdhPJwZTYKvwydD4anu9ZoDeJ/+MXfQIvSKKUvmILGtiwTQ+PaZRtb+yjAavY9X7+3ujnqWUAjr2g== X-Received: by 2002:a17:90a:de16:: with SMTP id m22mr13355525pjv.38.1631543592892; Mon, 13 Sep 2021 07:33:12 -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 l22sm8989068pgo.45.2021.09.13.07.33.12 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 13 Sep 2021 07:33:12 -0700 (PDT) Subject: Re: Regression with recent change To: Michael Matz Cc: Aldy Hernandez , gcc-patches References: <889cbb03-3a02-65e4-7790-c903293bacf7@gmail.com> <3af2aac4-1b26-ff97-b73a-fa7c086b8dd6@gmail.com> From: Jeff Law Message-ID: <84398b75-b47d-4110-9cf1-a713d933cf7d@gmail.com> Date: Mon, 13 Sep 2021 08:33:11 -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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00, 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: Mon, 13 Sep 2021 14:33:15 -0000 On 9/13/2021 8:18 AM, Michael Matz wrote: > Hello, > > On Mon, 13 Sep 2021, Jeff Law via Gcc-patches wrote: > >>> So it looks like there's some undefined behavior going on, even before >>> my patch. I'd like to get some feedback, because this is usually the >>> type of problems I see in the presence of a smarter threader... things >>> get shuffled around, problematic code gets isolated, and warning >>> passes have an easier time (or sometimes harder time) diagnosing >>> things. >> The original issue was PRE hanging, so I'd lean towards keeping the test as-is >> and instead twiddling any warning flags we can to make the diagnostics go >> away. > Or use this changed test avoiding the issues that I see with -W -Wall on > this testcase. I've verified that it still hangs before r194358 and is > fixed by that revision. > > Generally I think, our testsuite, even for ICEs or these kinds of hangs, > should make an effort to try to write conforming code; if at all possible. > Here it is possible. > > (I don't know if the new threader causes additional warnings, of course, > but at least the problems with sequence points and uninitialized use of > 'j' aren't necessary to reproduce the bug) Well, if we can twiddle the test to remove the undefined behavior without compromising its original intent, then that's obviously better -) jeff