From patchwork Mon Nov 13 14:26:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Earnshaw X-Patchwork-Id: 164511 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b909:0:b0:403:3b70:6f57 with SMTP id t9csp1242111vqg; Mon, 13 Nov 2023 06:33:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IHdXKbPXW6masKAqCbofOj4dYpELFKJAgjHzn9gz0QEhL+oEygxg9YneHsDmWsRgAGLW5si X-Received: by 2002:a05:622a:20c:b0:420:5b48:4a54 with SMTP id b12-20020a05622a020c00b004205b484a54mr8445449qtx.23.1699885997951; Mon, 13 Nov 2023 06:33:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699885997; cv=pass; d=google.com; s=arc-20160816; b=sFeWLu8Q5kIyfAbSxpZ1mqF/sJRF5Yzj4Nn/vE7IqH0/x/rbGqRMkaN+MA+IiyyEP4 IufgjOrmIf3sDDwSZseI1ROkAWvFIyOSCJ0+ETsuttJim1wXgClaMwwQ8l4XYnRv6ZEA PV/iauHT357kSTzzFpXDUFM5lmbFLwjT5FYaQAOGOOTGlaM8YY5RnrpJm+Y4pXvPvDVE A/dXWAe/kqoR4XfL9fR2ZmpP9RgSmsiJy9bFeQkEEpIafiBiJ8/1fyRr3fhA0wXC8HV3 6Jm5vPDzqa7L6q/JIcC2llyip/DlH4+RrKMGgXWw1N9bILjQa9pRSwn2vyEozEKhpHc0 q/+A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:arc-filter:dmarc-filter:delivered-to; bh=E93QdB4+R+Duc1Oye43WqcjzsH4d8PaTFwOMvk/WRmM=; fh=vcPCoAFD9ELdvNMTpDIWpczE2wb0OD9E1jzZw6wSlzw=; b=CiPVRYwQaJ9aBwaNf7zuUxIXlCPpWDoculFKe51zXBqLSOnFZUpixSmNKaHcxBT3tF +2zJJ1OAWKcPBtDF7rPg9DwCNMFeNibmNYiLxVHiSJNDDIvZiYpdecQuJjVyH6uJmXgX lM5WNffLPKnIyIuF+lMAwiJ3BSnwhmWelOCdCEwOV+ES/g6F1MfyPHAqXhOT0+yuZH8s NZ3pKeJc6Nmyufx0zq353oN0SoJL9fnKDGJ1T9sq2uKvqc83cxoVhh/idskheabTb1P8 3rkfv2FnA9bx5XaN2rhmvPoL8+cZmGYORsGrR/qQP3DHjv+5DxAsy88b5ePek7lCj24t lteQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id c10-20020a05622a024a00b0041b505bcef5si4842217qtx.415.2023.11.13.06.33.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 06:33:17 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A252C396C8C7 for ; Mon, 13 Nov 2023 14:29:41 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 2AE9E393E26D for ; Mon, 13 Nov 2023 14:27:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2AE9E393E26D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2AE9E393E26D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885656; cv=none; b=hMVQv+aXgCGB3ixoBcB4/7ZKNXEZlpdcjiBxkAiCiYHJySPWWrfD0dOvLjSSwSV2UCKAfZOIxjYk/6f7mNP9K2N84IQPXUSues4+HgGlrq3jJ7yZByoifvHkM+3N8HN4ceHXxRMSVwdxW+KAE6olM8woClkatoaBj6tXhfBk43g= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885656; c=relaxed/simple; bh=FMVfsPe8yCt/krQi1LygiupTQl/oCwgSImdgvwKrCXg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=Eq4cOfodANy9AEUH9ce20xRFPAaCf0zKSMU1l2B6socL5BnkLF7CZtdzp57QkxO+VhyQnBfiQV2VnWgJ/tyVHMLbmBiShlyJ//uIvLHmlMMi0AJlCSgt43md9qcJSSMoJbrwbwaGas5Ceq036DORMldOqjJ87JD+gOaLil6iDx0= ARC-Authentication-Results: i=1; server2.sourceware.org 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 767631007; Mon, 13 Nov 2023 06:28:20 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 87E433F7B4; Mon, 13 Nov 2023 06:27:34 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 16/22] arm: testsuite: improve compatibility of gcc.target/arm/macro_defs*.c Date: Mon, 13 Nov 2023 14:26:52 +0000 Message-Id: <20231113142658.69039-17-rearnsha@arm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231113142658.69039-1-rearnsha@arm.com> References: <20231113142658.69039-1-rearnsha@arm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.1 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782459660181429407 X-GMAIL-MSGID: 1782459660181429407 Convert these tests to use dg-add-options for increased compatibilty. Since they also result in an empty translation unit, override the default testsuite options. gcc/testsuite: * gcc.target/arm/macro_defs0.c: Use dg-effective-target and dg-add-options. * gcc.target/arm/macro_defs1.c: Likewise. * gcc.target/arm/macro_defs2.c: Likewise. --- gcc/testsuite/gcc.target/arm/macro_defs0.c | 7 +++---- gcc/testsuite/gcc.target/arm/macro_defs1.c | 6 ++---- gcc/testsuite/gcc.target/arm/macro_defs2.c | 6 ++---- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/gcc/testsuite/gcc.target/arm/macro_defs0.c b/gcc/testsuite/gcc.target/arm/macro_defs0.c index 684d49ffafa..17fd157452e 100644 --- a/gcc/testsuite/gcc.target/arm/macro_defs0.c +++ b/gcc/testsuite/gcc.target/arm/macro_defs0.c @@ -1,8 +1,7 @@ /* { dg-do compile } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-m" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=soft" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ -/* { dg-options "-march=armv7-m -mcpu=cortex-m3 -mfloat-abi=soft -mthumb" } */ +/* { dg-require-effective-target arm_arch_v7m_ok } */ +/* { dg-options "" } */ +/* { dg-add-options arm_arch_v7m } */ #ifdef __ARM_FP #error __ARM_FP should not be defined diff --git a/gcc/testsuite/gcc.target/arm/macro_defs1.c b/gcc/testsuite/gcc.target/arm/macro_defs1.c index 655ba9334f3..bd22154321e 100644 --- a/gcc/testsuite/gcc.target/arm/macro_defs1.c +++ b/gcc/testsuite/gcc.target/arm/macro_defs1.c @@ -1,10 +1,8 @@ /* { dg-do compile } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */ -/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */ /* { dg-require-effective-target arm_arch_v6m_ok } */ -/* { dg-options "-march=armv6-m -mthumb" } */ +/* { dg-options "" } */ +/* { dg-add-options arm_arch_v6m } */ #ifdef __ARM_NEON_FP #error __ARM_NEON_FP should not be defined #endif - diff --git a/gcc/testsuite/gcc.target/arm/macro_defs2.c b/gcc/testsuite/gcc.target/arm/macro_defs2.c index 9a960423562..a26fc237611 100644 --- a/gcc/testsuite/gcc.target/arm/macro_defs2.c +++ b/gcc/testsuite/gcc.target/arm/macro_defs2.c @@ -1,7 +1,7 @@ /* { dg-do compile } */ -/* { dg-options "-march=armv7ve -mcpu=cortex-a15 -mfpu=neon-vfpv4" } */ -/* { dg-add-options arm_neon } */ /* { dg-require-effective-target arm_neon_ok } */ +/* { dg-options "" } */ +/* { dg-add-options arm_neon } */ #ifndef __ARM_NEON_FP #error __ARM_NEON_FP is not defined but should be @@ -10,5 +10,3 @@ #ifndef __ARM_FP #error __ARM_FP is not defined but should be #endif - -