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 58B91393E258 for ; Mon, 13 Nov 2023 14:27:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 58B91393E258 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 58B91393E258 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=1699885654; cv=none; b=qHJInldXYgA4+z5aS8c4gcjeQxZ62mIg7BgT6P3k1XjJG/AY/MUaSnO1mv0Xofp97QAVnHpR4S8V494ZO3oCwUfCfXO3oocNB3fjLPiELJwiXo6jeM38WkpQuaEVx/8HlgcTkX5wLSbvNRCTPLBLyek0JVmJxYkiERDyRN8ffqc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699885654; c=relaxed/simple; bh=Tr6uSt5PCwszLXQrS9x3UkiEDEqShrIKVCvn8sAtYqU=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=j+iQDUEmodBcNbNwEdZNiiytqk67rXdX/2Iy+wqBKFGJirbU28jHSVjZkJZqsd2t+mmepM2sFvbUPVf5otXbvR2zdSVY28CQxMH8wUk+y3X9T71UVrtGfcFD4Yaa5rrGKsND0WoDpOm3H8jIRkfwxtQA3mMHKNd0jYucb3cIdDo= 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 4EF411007; Mon, 13 Nov 2023 06:28:18 -0800 (PST) Received: from e126323.arm.com (unknown [10.57.41.187]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 60D683F7B4; Mon, 13 Nov 2023 06:27:32 -0800 (PST) From: Richard Earnshaw To: gcc-patches@gcc.gnu.org Cc: Richard Earnshaw Subject: [committed 13/22] arm: testsuite: improve compatibility of pragma_arch_switch_2.c Date: Mon, 13 Nov 2023 14:26:49 +0000 Message-Id: <20231113142658.69039-14-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 Content-Type: multipart/mixed; boundary="------------2.34.1" Content-Transfer-Encoding: 8bit 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 List-Id: This is a multi-part message in MIME format. --------------2.34.1 Content-Type: text/plain; charset=UTF-8; format=fixed Content-Transfer-Encoding: 8bit This test was explicitly setting the architecture on the command-line and in the body of the test. In both cases this causes problems with the auto FPU setting. Fix by using the testsuite infrastructure correctly and by adding +fp to the pragma. gcc/testsuite: * gcc.target/arm/pragma_arch_switch_2.c: Use testsuite infrastructure to set the architecture flags. Add +fp to the pragma that changes the architecture. --- gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --------------2.34.1 Content-Type: text/x-patch; name="0013-arm-testsuite-improve-compatibility-of-pragma_arch_s.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="0013-arm-testsuite-improve-compatibility-of-pragma_arch_s.patch" diff --git a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c index 5080d2c7a91..567943bd8ed 100644 --- a/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c +++ b/gcc/testsuite/gcc.target/arm/pragma_arch_switch_2.c @@ -3,9 +3,10 @@ /* { dg-do assemble } */ /* { dg-require-effective-target arm_arm_ok } */ /* { dg-require-effective-target arm_arch_v5te_arm_ok } */ -/* { dg-additional-options "-Wall -O2 -march=armv5te -std=gnu99 -marm" } */ +/* { dg-additional-options "-Wall -O2 -std=gnu99" } */ +/* { dg-add-options arm_arch_v5te_arm } */ -#pragma GCC target ("arch=armv6") +#pragma GCC target ("arch=armv6+fp") int test_assembly (int hi, int lo) { int res; --------------2.34.1--