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 2E10F383FBA6 for ; Wed, 31 Aug 2022 15:59:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2E10F383FBA6 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 27VFwP2K003222; Wed, 31 Aug 2022 10:58:25 -0500 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 27VFwPps003221; Wed, 31 Aug 2022 10:58:25 -0500 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 31 Aug 2022 10:58:25 -0500 From: Segher Boessenkool To: Peter Bergner Cc: GCC Patches Subject: Re: [PATCH] rs6000: Don't ICE when we disassemble an MMA variable [PR101322] Message-ID: <20220831155825.GQ25951@gate.crashing.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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: Hi! On Fri, Aug 26, 2022 at 10:50:00PM -0500, Peter Bergner wrote: > When we expand an MMA disassemble built-in with C++ using a pointer that > is casted to a valid MMA type, the type isn't passed down to the expand (The perfect tense of cast is "cast"). > machinery and we end up using the base type of the pointer which leads to > an ICE. This patch enforces we always use the correct MMA type regardless > of the pointer type being used. > --- /dev/null > +++ b/gcc/testsuite/g++.target/powerpc/pr101322.C > @@ -0,0 +1,17 @@ > +/* PR target/101322 */ > +/* { dg-options "-O2 -mdejagnu-cpu=power10" } */ > +/* { dg-require-effective-target power10_ok } */ These should be the other way around. It makes no sense to set option X before testing if you can set option X. Even if it would technically work, the primary consumer of any source code is the humans who read it, and humans read code top down. Segher