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 34E8E3858404 for ; Wed, 31 Aug 2022 15:25:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 34E8E3858404 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 27VFOCQX001559; Wed, 31 Aug 2022 10:24:12 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27VFOCFf001558; Wed, 31 Aug 2022 10:24:12 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 31 Aug 2022 10:24:12 -0500 From: Segher Boessenkool To: "Kewen.Lin" Cc: GCC Patches , David Edelsohn , Peter Bergner Subject: Re: [PATCH] rs6000/test: Fix bswap64-4.c with has_arch_ppc64 [PR106680] Message-ID: <20220831152412.GP25951@gate.crashing.org> References: <69277846-f587-b79e-f741-a2942d326778@linux.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <69277846-f587-b79e-f741-a2942d326778@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 Wed, Aug 31, 2022 at 05:33:28PM +0800, Kewen.Lin wrote: > Test case bswap64-4.c suffers the issue as its comments: > > /* On some versions of dejagnu this test will fail when > biarch testing with RUNTESTFLAGS="--target_board=unix > '{-m64,-m32}'" due to -m32 being added on the command > line after the dg-options -mpowerpc64. > common/config/rs6000/rs6000-common.c: > rs6000_handle_option disables -mpowerpc64 for -m32. */ > > As tested, on test machine with dejaGnu 1.6.2, the compilation > option order looks like: -m32 ... -mpowerpc64, option > -mpowerpc64 still takes effect; While on test machine with > dejaGnu 1.5.1, the option order looks like: -mpowerpc64 ... -m32, > option -mpowerpc64 is disabled by -m32, then the case fails. *Should* -mpowerpc64 be disabled by -m32? Should *any* explicit command line flag ever be disabled like that? (Not talking about things like -m32 -m64, this should be supported for convenience). -mpowerpc64 -m32 should always mean the same as -m32 -mpowerpc64, that's the principle of least surprise. Where then dg-options is placed does not matter in this testcase, both -m32 -mno-powerpc64 and -m32 -mpowerpc64 are ilp32. Segher