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 9F79C3858D33 for ; Tue, 29 Aug 2023 03:29:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9F79C3858D33 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 DF3B2300089; Tue, 29 Aug 2023 03:29:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=irq.a4lg.com; s=2017s01; t=1693279747; bh=SevFNk++5NsaZeWiyv/PwNFloBHBcfupPrV7PIeWGBU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Mime-Version:Content-Transfer-Encoding; b=ro2f4BuylDGmsbJAOX9Zh4xKCRIKl9jfx61aasNlWvj2855MmpU0+J6WAkezNgjfa qEu2Bo25+p+6E+G787DWN4E33/ZnkQkPdSTgCjbJ1q7GPCTdE3HqSYNZX0+vUZfOzQ 9AzqTE2E8QNDKt3V5i70yM1ZC7/gAzhJCyCDb4Aw= From: Tsukasa OI To: Tsukasa OI , Kito Cheng , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Jeff Law Cc: gcc-patches@gcc.gnu.org Subject: [PATCH v2] RISC-V: Make PR 102957 tests more comprehensive Date: Tue, 29 Aug 2023 03:28:56 +0000 Message-ID: In-Reply-To: <3aa13843de038d960fdb3415f416243e43b376f2.1691745095.git.research_trasio@irq.a4lg.com> References: <3aa13843de038d960fdb3415f416243e43b376f2.1691745095.git.research_trasio@irq.a4lg.com> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,GIT_PATCH_0,KAM_MANYTO,KAM_SHORT,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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 partially 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 adds pr102957-2.c to make sure that there will be no errors if we parse a valid two-letter extension name. gcc/testsuite/ChangeLog: * gcc.target/riscv/pr102957-2.c: New test case using the 'Zk' extension to continue testing whether we can use valid two-letter extensions. --- gcc/testsuite/gcc.target/riscv/pr102957-2.c | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 gcc/testsuite/gcc.target/riscv/pr102957-2.c diff --git a/gcc/testsuite/gcc.target/riscv/pr102957-2.c b/gcc/testsuite/gcc.target/riscv/pr102957-2.c new file mode 100644 index 000000000000..fe6241466354 --- /dev/null +++ b/gcc/testsuite/gcc.target/riscv/pr102957-2.c @@ -0,0 +1,5 @@ +/* { dg-do compile } */ +/* { dg-options "-march=rv64gzk -mabi=lp64" } */ +int foo() +{ +} base-commit: 818cc9f2d2f3dbbd4004ff85d3125d92d1e430c9 -- 2.42.0