From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id CCE423858D39 for ; Fri, 2 Sep 2022 17:37:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CCE423858D39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 282Ha573019474; Fri, 2 Sep 2022 12:36:05 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 282Ha41i019473; Fri, 2 Sep 2022 12:36:04 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Fri, 2 Sep 2022 12:36:04 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: Peter Bergner , David Edelsohn , GCC Patches Subject: Re: [PATCH] rs6000/test: Fix bswap64-4.c with has_arch_ppc64 [PR106680] Message-ID: <20220902173604.GW25951@gate.crashing.org> References: <69277846-f587-b79e-f741-a2942d326778@linux.ibm.com> <4e527a22-2dd6-9fa3-b255-4f71b90b77f7@linux.ibm.com> <5d7a002c-829a-da5a-f630-3533084aef0e@linux.ibm.com> <20220901145704.GC25951@gate.crashing.org> <9b27e429-9f34-dc97-7ab6-4e5f6b02324e@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9b27e429-9f34-dc97-7ab6-4e5f6b02324e@linux.ibm.com> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Fri, Sep 02, 2022 at 08:50:52AM +0800, Kewen.Lin wrote: > on 2022/9/1 22:57, Segher Boessenkool wrote: > > These two are independent, but apparently we have a bug here, which will > > make what you did malfunction in some cases -- the test will not run for > > ilp32 if you have RUNTESTFLAGS {-m32,-m64}. > > Yeah, because of the bug (or call it surprised behavior), No, I call it a bug. Because that is what it is! > the test case can > fail for some dejaGnu version like 1.5.1 (how it places the dg-options matters). Yes, but that is only one way to expose the problem. The bug just should be fixed. > But to be clarified, the order of > > /* { dg-options "-O2 -mpowerpc64" } */ > > and > > /* { dg-require-effective-target has_arch_ppc64 } */ > > matters in this proposed fix, not for the line with ilp32. Of course :-) > has_arch_ppc64 uses current_compiler_flags which only incorporates dg-options > which is placed before the dg-require-effective-target. I guess it's related > to how dejaGnu parses lines and sets global variables, for this kind of case, > we have to put the expected order for now. Even just to avoid having to uselessly edit hundreds of testcases, it would be better to just fix the bug! Segher