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 A75DF3858D1E for ; Thu, 1 Sep 2022 14:58:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A75DF3858D1E 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 281Ev5WQ023856; Thu, 1 Sep 2022 09:57:05 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 281Ev4GF023855; Thu, 1 Sep 2022 09:57:04 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Thu, 1 Sep 2022 09:57: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: <20220901145704.GC25951@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> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5d7a002c-829a-da5a-f630-3533084aef0e@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 Thu, Sep 01, 2022 at 04:57:59PM +0800, Kewen.Lin wrote: > on 2022/8/31 22:13, Peter Bergner wrote: > > On 8/31/22 4:33 AM, Kewen.Lin wrote: > >> @@ -1,7 +1,8 @@ > >> /* { dg-do compile { target { powerpc*-*-* } } } */ > >> /* { dg-skip-if "" { powerpc*-*-aix* } } */ > >> -/* { dg-options "-O2 -mpowerpc64" } */ > >> /* { dg-require-effective-target ilp32 } */ > >> +/* { dg-options "-O2 -mpowerpc64" } */ > >> +/* { dg-require-effective-target has_arch_ppc64 } */ > > > > With many of our recent patches moving the dg-options before any > > dg-requires-effectice-target so it affects the results of the > > dg-requires-effectice-target test, this looks like it's backwards > > from that process. I understand why, so I think an explicit comment > > here in the test case explaining why it's after in this case. > > Just so in a few years when we come back to this test case, we > > won't accidentally undo this change. > > Oops, the diff shows it's like "after", but it's actually still "before". :) > The dg-options is meant to be placed before the succeeding has_arch_ppc64 > effective target which is supposed to use dg-options to compile. I felt > good to let ilp32 checking go first then has_arch_ppc64, so moved dg-option > downward. 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}. It should not make a difference, -mpowerpc64 and -m32 should be wholly independent, and their order should not matter. So the order of the /* { dg-require-effective-target ilp32 } */ /* { dg-options "-O2 -mpowerpc64" } */ lines should not make a difference either. But it does :-( Segher