From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-sender-0.a4lg.com (mail-sender.a4lg.com [153.120.152.154]) by sourceware.org (Postfix) with ESMTPS id 619613858D20 for ; Fri, 11 Aug 2023 14:30:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 619613858D20 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=irq.a4lg.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=irq.a4lg.com Received: from [127.0.0.1] (localhost [127.0.0.1]) by mail-sender-0.a4lg.com (Postfix) with ESMTPSA id 48DCC300089; Fri, 11 Aug 2023 14:29:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1691764198; bh=o8UEPnkc99qMVgE/obFC4NX3u6yXipYDPtX/tfhFMzI=; h=Message-ID:Date:Mime-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=K4kz3TCvXieTmr693dEZF+TJ0Q2avn9zpfm7PZQ7rCWDThFOFhPt2Jx0ip0ySOzwn lDOHCRy8zsNxkIuAjMee8O1OjzC0FjdaL6aQ6l7CQ66C6O4MICyDMb+EgECuAWiJe4 llRB41Paa0cOPmQ4AfkNp2kOS6bbWuYsemnfDB/M= Message-ID: Date: Fri, 11 Aug 2023 23:29:57 +0900 Mime-Version: 1.0 Subject: Re: [PATCH] RISC-V: Revive test case PR 102957 Content-Language: en-US To: Jeff Law Cc: gcc-patches@gcc.gnu.org References: <3aa13843de038d960fdb3415f416243e43b376f2.1691745095.git.research_trasio@irq.a4lg.com> From: Tsukasa OI In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,KAM_NUMSUBJECT,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP 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 2023/08/11 23:15, Jeff Law wrote: > > > On 8/11/23 03:11, Tsukasa OI via Gcc-patches wrote: >> From: Tsukasa OI >> >> Commit c283c4774d1c ("RISC-V: Throw compilation error for unknown >> extensions") changed how do we handle unknown extensions and >> commit 6f709f79c915a ("[committed] [RISC-V] Fix expected diagnostic >> messages >> in testsuite") "fixed" test failures caused by that change (on >> pr102957.c, >> by testing the error message after the first change). >> >> However, the latter change will break the original intent of PR 102957 >> test >> case because we wanted to make sure that we can parse a valid two-letter >> extension name. >> >> Fortunately, there is a valid two-letter extension name, 'Zk' (standard >> scalar cryptography extension superset with NIST algorithm suite). >> >> This commit puts this extension name and revives the intent of the >> test case >> for PR 102957. >> >> gcc/testsuite/ChangeLog: >> >>     * gcc.target/riscv/pr102957.c: Remove "dg-error" because we don't >>     need to test for error message.  Use the 'Zk' extension to continue >>     testing whether we can use valid two-letter extensions. > This doesn't look right to me.  The whole point of this specific dg line > is to verify that we get an error with an invalid extension specification. > > What might make more sense would be to split this into two tests.  One > which continues to test that we get an error for something like zb and > the other with everything else. > > jeff > Originally, it tested that a two letter extension ('Zb') is accepted by GCC (because the background of PR 102957 was GCC assumed multi-letter 'Z' extensions are three letters or more). After rejecting unrecognized extensions, "dg-error" is added **just to avoid the test failure** and that doesn't look right. Yes, we now don't have an ICE (like in the original report) but after the PR 102957 fix, we just accepted it, not rejecting it. Instead, we have a valid (recognized) two-letter 'Z' extension: 'Zk'. I think replacing "zb" with "zk" is more correct considering the original bug report (PR 102957) and its assumption. cf. Regards, Tsukasa