From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2049) id 6565B384B0C9; Fri, 6 May 2022 14:42:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6565B384B0C9 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Matthew Malcomson To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/ARM/heads/morello)] testsuite: Add cheri_capability_any effective target X-Act-Checkin: gcc X-Git-Author: Alex Coplan X-Git-Refname: refs/vendors/ARM/heads/morello X-Git-Oldrev: 46a374536a91244b517b37e0a36c69800051739a X-Git-Newrev: 15a07806b6b87d642e01dac15c6f8225d541882f Message-Id: <20220506144259.6565B384B0C9@sourceware.org> Date: Fri, 6 May 2022 14:42:59 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 May 2022 14:42:59 -0000 https://gcc.gnu.org/g:15a07806b6b87d642e01dac15c6f8225d541882f commit 15a07806b6b87d642e01dac15c6f8225d541882f Author: Alex Coplan Date: Tue May 3 12:15:46 2022 +0100 testsuite: Add cheri_capability_any effective target As of Stam's recent patch, we only define __CHERI__ and friends for real capability targets (not fakecap). This allows us to define an effective target that only matches for hybrid and purecap (not fakecap). Apply the filter to a couple of tests that should no longer be run on fakecap with the recent macro changes. Diff: --- gcc/testsuite/gcc.target/aarch64/morello/predefines.c | 2 +- gcc/testsuite/lib/target-supports.exp | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/testsuite/gcc.target/aarch64/morello/predefines.c b/gcc/testsuite/gcc.target/aarch64/morello/predefines.c index 2da0ba1cd96..d7e2b667121 100644 --- a/gcc/testsuite/gcc.target/aarch64/morello/predefines.c +++ b/gcc/testsuite/gcc.target/aarch64/morello/predefines.c @@ -1,4 +1,4 @@ -/* { dg-do run } */ +/* { dg-do run { target cheri_capability_any } } */ /* Declare twice to ensure that the types are the same (error otherwise). */ __INTPTR_TYPE__ x(int); diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 544d597710b..f9d2c149c70 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -3580,6 +3580,14 @@ proc check_effective_target_cheri_capability_pure { } { }] } +proc check_effective_target_cheri_capability_any { } { + return [check_no_compiler_messages cheri_capability_any assembly { + #if !defined (__CHERI__) + #error foo + #endif + }] +} + # Return the size in bits of an SVE vector, or 0 if the size is variable. proc aarch64_sve_bits { } { return [check_cached_effective_target aarch64_sve_bits {