From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 186AC3857725 for ; Tue, 5 Sep 2023 15:00:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 186AC3857725 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C2C1D11FB; Tue, 5 Sep 2023 08:01:10 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.110.72]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 112AF3F64C; Tue, 5 Sep 2023 08:00:31 -0700 (PDT) From: Richard Sandiford To: Szabolcs Nagy Mail-Followup-To: Szabolcs Nagy ,, , , richard.sandiford@arm.com Cc: , , Subject: Re: [PATCH 10/11] aarch64: Fix branch-protection error message tests References: <711459e210437af7580296f5bff2ef72b6039e7c.1692699125.git.szabolcs.nagy@arm.com> Date: Tue, 05 Sep 2023 16:00:30 +0100 In-Reply-To: <711459e210437af7580296f5bff2ef72b6039e7c.1692699125.git.szabolcs.nagy@arm.com> (Szabolcs Nagy's message of "Tue, 22 Aug 2023 11:39:17 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-25.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,KAM_SHORT,SPF_HELO_NONE,SPF_NONE,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: Szabolcs Nagy writes: > Update tests for the new branch-protection parser errors. > > gcc/testsuite/ChangeLog: > > * gcc.target/aarch64/branch-protection-attr.c: Update. > * gcc.target/aarch64/branch-protection-option.c: Update. OK, thanks. (And I agree these are better messages. :)) I think that's the last of the AArch64-specific ones. The others will need to be reviewed by Kyrill or Richard. Richard > --- > gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c | 6 +++--- > gcc/testsuite/gcc.target/aarch64/branch-protection-option.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c b/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c > index 272000c2747..dae2a758a56 100644 > --- a/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c > +++ b/gcc/testsuite/gcc.target/aarch64/branch-protection-attr.c > @@ -4,19 +4,19 @@ void __attribute__ ((target("branch-protection=leaf"))) > foo1 () > { > } > -/* { dg-error {invalid protection type 'leaf' in 'target\("branch-protection="\)' pragma or attribute} "" { target *-*-* } 5 } */ > +/* { dg-error {invalid argument 'leaf' for 'target\("branch-protection="\)'} "" { target *-*-* } 5 } */ > /* { dg-error {pragma or attribute 'target\("branch-protection=leaf"\)' is not valid} "" { target *-*-* } 5 } */ > > void __attribute__ ((target("branch-protection=none+pac-ret"))) > foo2 () > { > } > -/* { dg-error "unexpected 'pac-ret' after 'none'" "" { target *-*-* } 12 } */ > +/* { dg-error {argument 'none' can only appear alone in 'target\("branch-protection="\)'} "" { target *-*-* } 12 } */ > /* { dg-error {pragma or attribute 'target\("branch-protection=none\+pac-ret"\)' is not valid} "" { target *-*-* } 12 } */ > > void __attribute__ ((target("branch-protection="))) > foo3 () > { > } > -/* { dg-error {missing argument to 'target\("branch-protection="\)' pragma or attribute} "" { target *-*-* } 19 } */ > +/* { dg-error {invalid argument '' for 'target\("branch-protection="\)'} "" { target *-*-* } 19 } */ > /* { dg-error {pragma or attribute 'target\("branch-protection="\)' is not valid} "" { target *-*-* } 19 } */ > diff --git a/gcc/testsuite/gcc.target/aarch64/branch-protection-option.c b/gcc/testsuite/gcc.target/aarch64/branch-protection-option.c > index 1b3bf4ee2b8..e2f847a31c4 100644 > --- a/gcc/testsuite/gcc.target/aarch64/branch-protection-option.c > +++ b/gcc/testsuite/gcc.target/aarch64/branch-protection-option.c > @@ -1,4 +1,4 @@ > /* { dg-do "compile" } */ > /* { dg-options "-mbranch-protection=leaf -mbranch-protection=none+pac-ret" } */ > > -/* { dg-error "unexpected 'pac-ret' after 'none'" "" { target *-*-* } 0 } */ > +/* { dg-error "argument 'none' can only appear alone in '-mbranch-protection='" "" { target *-*-* } 0 } */