| Message ID | 20260407092514.2808556-1-torbjorn.svensson@foss.st.com |
|---|---|
| State | New |
| Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id B86784BA2E0E for <patchwork@sourceware.org>; Tue, 7 Apr 2026 09:26:18 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B86784BA2E0E Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=foss.st.com header.i=@foss.st.com header.a=rsa-sha256 header.s=selector2 header.b=gUdUvGq/ X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from GVXPR05CU001.outbound.protection.outlook.com (mail-swedencentralazon11013004.outbound.protection.outlook.com [52.101.83.4]) by sourceware.org (Postfix) with ESMTPS id 0566D4BA2E06 for <gcc-patches@gcc.gnu.org>; Tue, 7 Apr 2026 09:25:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0566D4BA2E06 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=foss.st.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 0566D4BA2E06 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=52.101.83.4 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1775553936; cv=pass; b=DK7m3wh6nupZOBqstvTxDslanMK435Su3yTCWw/j5wjqXzksqldJZXBPXKexcZ01FAZdeKqhxhg2Dc6GUISh9lGfw6MEk2wEdVFslOgziEUFb0bCH+O9eD27+9ItDhFw7sXu03eSxU6cTnQq8Vj7YsjpdOCbDDgL2NVQJGkmqX8= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1775553936; c=relaxed/simple; bh=I+QcDBe1qqK7tomkg4B/uuzAv9G7OaC+RS57SQCBwVY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=L+kRypVZc0+C2l2Fb5WsKFI5CeLliLcGwzhuynyNxe0nRE1BDgMGHYAN3PLA1jVpoQ802XWa02dlE9CVW04M44hdz4hKpRnr/gN2TusSRmHEaXmiUIz0RcSqakx20itrQI2rfqTRE7TrmhDpYaU8juWU5I2wYIYeuFW8nqArtY8= ARC-Authentication-Results: i=2; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0566D4BA2E06 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Kkej6pSkywExi1ZhVvON5lg3nI4QCdTlZlNRlyYtR/HUaVW1XWMp4ZUIcpW56tmKnoSREa9aiuaGrbeJKKQm1tXtkIPGU985bMgHsu1Arx/hRlFQkCoiaqLktUrEsQoGdSvD85+p7oSKGUaMXc3jvRAQyNsYtXDUmxE+/VfU8+fbKJiEI2cg/UoZjvYoC/XWH6U26uls+zMCQ916fAtRz6ijunD/mHitxBQhVXtxN1ido6eizFAp7SdgeSZ6pBXAeEDunGkT4UmpzdkK2gds98vsn3rLhHiUIy6WV/bVFeXkwoxYvYkkW3KJQKYLtusyr39SFmN9Nin5ZUCwa6wgRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=SKDFgbeq6WKNnyCMnwSs2TGVvy9VQ6eiDO0l7iMVWTM=; b=YSRW3LzuLjR7og6pl2hw9LuyzqLeWnMoAeDHnh1cZwZlfU4ZPfmw3WqtXdL8DxGxXEpkfe+uikLwDWki/KvzooLxhxUEKqAR2mX5B9nXwQMDpqg53wPWKOawbEdYsfHyE04DrIxwU/nuCmK9UKQWaU6n2yc42rddTBqjzA76f8OK7RbCYOL8CL462UOQKfKzp6hsuSbNnDxeFkiQ6Hfs6Ldq12jd4XJbierrKw2boLG0qq7BvVtEWZfhWAKj0d4HiIcBRV9HylL4wA4a+0hppe8tJBLheMNSJxiMSHmZygD7ZSobU/l6+ZNirBTPMt6DuY65+OIyVIEsOgsV9tfI7g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 164.130.1.60) smtp.rcpttodomain=gcc.gnu.org smtp.mailfrom=foss.st.com; dmarc=fail (p=none sp=none pct=100) action=none header.from=foss.st.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=SKDFgbeq6WKNnyCMnwSs2TGVvy9VQ6eiDO0l7iMVWTM=; b=gUdUvGq/EtS7hqhgrbAS1n+qjFyMckgsV0mI5zOqm5wY0xyy0uhCTh0QFAAAt98MCkyNphHUhOF6mJY/v7a6Qij69eApAnIlr+vS499+vgGkNxeT5i5cM5r4KTkhOUPVo/MRDsLNV6wteoro3S+NXwmeIHNwqrTG+LDBjtAaNqGp+VRr8bwVdshypl7MJJr9PSnB2Mi7jcUiKLig8Rm0VGvpIJoyHKr2WbjCWMD+VH7ZiPTwM/KiYja8xePzq1FboD84nUsTB+RoJVzZWmEn8RHiq/USxNZ2L+raHlMkOghxhxVJuyZPvJhODb8sw1D2yhaW3HSRwspCSjQoQTMM+A== Received: from DUZP191CA0065.EURP191.PROD.OUTLOOK.COM (2603:10a6:10:4fa::6) by GVXPR10MB8613.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:150:1e5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.20; Tue, 7 Apr 2026 09:25:31 +0000 Received: from DU2PEPF00028D0F.eurprd03.prod.outlook.com (2603:10a6:10:4fa:cafe::c) by DUZP191CA0065.outlook.office365.com (2603:10a6:10:4fa::6) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9769.33 via Frontend Transport; Tue, 7 Apr 2026 09:25:28 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 164.130.1.60) smtp.mailfrom=foss.st.com; dkim=none (message not signed) header.d=none;dmarc=fail action=none header.from=foss.st.com; Received-SPF: Fail (protection.outlook.com: domain of foss.st.com does not designate 164.130.1.60 as permitted sender) receiver=protection.outlook.com; client-ip=164.130.1.60; helo=smtpO365.st.com; Received: from smtpO365.st.com (164.130.1.60) by DU2PEPF00028D0F.mail.protection.outlook.com (10.167.242.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9745.21 via Frontend Transport; Tue, 7 Apr 2026 09:25:30 +0000 Received: from STKDAG1NODE2.st.com (10.75.128.133) by smtpO365.st.com (10.250.44.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 7 Apr 2026 11:28:15 +0200 Received: from jkgcxl0012.jkg.st.com (10.74.22.122) by STKDAG1NODE2.st.com (10.75.128.133) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Tue, 7 Apr 2026 11:25:29 +0200 From: =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= <torbjorn.svensson@foss.st.com> To: <gcc-patches@gcc.gnu.org>, <richard.earnshaw@arm.com> CC: <christophe.lyon@arm.com>, =?utf-8?q?Torbj=C3=B6rn_SVENSSON?= <torbjorn.svensson@foss.st.com> Subject: [PATCH v2] testsuite: arm: xfail test unless soft float of DP FP [PR113276] Date: Tue, 7 Apr 2026 11:23:53 +0200 Message-ID: <20260407092514.2808556-1-torbjorn.svensson@foss.st.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260402121100.2719770-1-torbjorn.svensson@foss.st.com> References: <20260402121100.2719770-1-torbjorn.svensson@foss.st.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Originating-IP: [10.74.22.122] X-ClientProxiedBy: STKCAS1NODE1.st.com (10.75.128.134) To STKDAG1NODE2.st.com (10.75.128.133) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU2PEPF00028D0F:EE_|GVXPR10MB8613:EE_ X-MS-Office365-Filtering-Correlation-Id: f355b6b2-72b6-4d47-2887-08de94879d18 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700016|1800799024|376014|82310400026|42112799006|13003099007|22082099003|18002099003|56012099003; X-Microsoft-Antispam-Message-Info: qUngXHcU/fV3JRLam3gsLIghTmHOJc0LKqOdF9CX91ZL+EfPsHlEa285Asbr4VQCSQhjVJhBvxcr/XSHGREHKGXz0wZdwZ3dueUXSrKZNT5qN1VTlSX//b3aw0GqEjE+6uIPX/CMMVZlJRH/HyjB+plazEgijeFJ4vr1gEKurImywOmU2tWsmkP4qijfdl95ORaOSQJFT/zhU69oDRjZS5WvhTy4obN8RSganDNIylWLwct1HTpcxlYMGUMXzLl8gp99odO3yeUtZ16LgzJVyZ0RqVB5wBeBhxgLSmgKRcUE56vGLbIDmouQyfhquL1HJYAXMgX/nV2Yp3kNGiNHMheRYY1+R9z6R+kbv3+p38hrwD2NMWxyTJ0tGfZvJeCfdHIpako2pYPuRai9YiB9C1KTg9S0UNErhto8V1fWCm0K9RC5Zg6n1MsWrD1gExlQa0FxyW0wV/4vrzVaoLtlk7ALqL+6X6A1lSA7zPP58p4yDFiCSA3ZR9h/1McnDCjFe2+TFmJDdCndz6SdeBAyGkSVL3OH8d0DfEq01BJQ8v4VuqoBYShU2iBlyAEe6z5NHB6jOcHXACHEvEJdz5A0vUGgd1gyisL2/tWi8G63XzvFocj+MWSKbGoa/r1GgIP8Nz7KEkYCeDOY0PvuWBUjXFUSdnWeqGur+qlHKAyFmSh4+jBDQJo+0noyNPTSOnX7t4MkEwSlNv/TYa+NSSAjUt4EuUCNGwFMBGpH7bqrlzM= X-Forefront-Antispam-Report: CIP:164.130.1.60; CTRY:IT; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:smtpO365.st.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700016)(1800799024)(376014)(82310400026)(42112799006)(13003099007)(22082099003)(18002099003)(56012099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bswS64yU7dFsgtfjjd6LELK76DnI9B7Ne8EZX57sbh+kFwt5UEcoAGCg6EnaVcFvptPQZ/NxJjVwnkDguo78BvE++Wg86PnmmHmbEJ7sfHoZOG7BwLut2twqddSuOifdiXZJstzaBxRkvYXjU743jkqBbXoS2CEp11y3irjaypzPH0w/bctFePoFOYf1NsYshNXISVreNW2fkUCMyRg2tCkitduPH2An6dyBMeGUY/b4+G/xnczgLJLZqqIDMLYj3rRRmMKS0TDTQ18tn3U/X8O2seUBbhiZjuE/yQaer2/gaaY6jNZ8banbcaueku1Yv1PRRQWwC+IR1ImHUljEvKmcODZTeZpEBxdsP7gja/ZiE6Bj/0DGYwVMBEh1cIA9K/pVFOMuClGfZJpk6CcSTx6w164621KRT9aQ/fnCxhWTme4d0nEIm2mQOeYzth0L X-OriginatorOrg: foss.st.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2026 09:25:30.9203 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f355b6b2-72b6-4d47-2887-08de94879d18 X-MS-Exchange-CrossTenant-Id: 75e027c9-20d5-47d5-b82f-77d7cd041e8f X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=75e027c9-20d5-47d5-b82f-77d7cd041e8f; Ip=[164.130.1.60]; Helo=[smtpO365.st.com] X-MS-Exchange-CrossTenant-AuthSource: DU2PEPF00028D0F.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR10MB8613 X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED, 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 sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
| Series |
[v2] testsuite: arm: xfail test unless soft float of DP FP [PR113276]
|
|
Commit Message
Torbjörn SVENSSON
April 7, 2026, 9:23 a.m. UTC
Changes since v1:
- Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu.
Ok for trunk and releases/gcc-15?
--
gcc/testsuite/ChangeLog:
PR testsuite/113276
* gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm*
unless soft float or double-precision FP.
* lib/target-supports.exp
(check_effective_target_arm_softfp_or_dp): New function.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
---
.../gcc.dg/torture/fp-double-convert-float-1.c | 2 +-
gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
Comments
On 07/04/2026 10:23, Torbjörn SVENSSON wrote: > Changes since v1: > > - Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu. > > Ok for trunk and releases/gcc-15? > > -- > > gcc/testsuite/ChangeLog: > > PR testsuite/113276 > * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* > unless soft float or double-precision FP. > * lib/target-supports.exp > (check_effective_target_arm_softfp_or_dp): New function. > > Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> > --- > .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- > gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ > 2 files changed, 17 insertions(+), 1 deletion(-) > > diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c > index 1c28a9e101e..7326ae10a9f 100644 > --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c > +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c > @@ -1,5 +1,5 @@ > /* PR57245 */ > -/* { dg-do run } */ > +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ > /* { dg-require-effective-target fenv } */ > /* { dg-require-effective-target hard_float } */ > /* { dg-additional-options "-frounding-math" } */ > diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp > index 3f428ad5817..b61f77233f2 100644 > --- a/gcc/testsuite/lib/target-supports.exp > +++ b/gcc/testsuite/lib/target-supports.exp > @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { > }] > } > > +# Return 1 if current target uses soft-float or supports double-precision FP > +proc check_effective_target_arm_softfp_or_dp { } { > + if { ![istarget arm*-*-*] } { > + return 0 > + } > + > + return [check_no_compiler_messages arm_softfp_or_dp assembly { > + #ifdef __ARM_FP // Not defined => soft float > + # if ((__ARM_FP & 8) == 0) > + # error __ARM_FP indicates that double-precision is not supported > + # endif > + #endif > + int main (void) { return 0; } > + } "" ] > +} > + > # Return 1 if GCC was configured with --with-mode= > proc check_effective_target_default_mode { } { > I think I'd rather the test be called arm_mixed_fp (ie a mix of hard and softfp). The logic for that is inverted from your current test, but then you don't need the inversion when you use the test for the xfail. OK with that change. R.
On 2026-04-08 11:57, Richard Earnshaw (foss) wrote: > On 07/04/2026 10:23, Torbjörn SVENSSON wrote: >> Changes since v1: >> >> - Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu. >> >> Ok for trunk and releases/gcc-15? >> >> -- >> >> gcc/testsuite/ChangeLog: >> >> PR testsuite/113276 >> * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* >> unless soft float or double-precision FP. >> * lib/target-supports.exp >> (check_effective_target_arm_softfp_or_dp): New function. >> >> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> >> --- >> .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- >> gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ >> 2 files changed, 17 insertions(+), 1 deletion(-) >> >> diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >> index 1c28a9e101e..7326ae10a9f 100644 >> --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >> +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >> @@ -1,5 +1,5 @@ >> /* PR57245 */ >> -/* { dg-do run } */ >> +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ >> /* { dg-require-effective-target fenv } */ >> /* { dg-require-effective-target hard_float } */ >> /* { dg-additional-options "-frounding-math" } */ >> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp >> index 3f428ad5817..b61f77233f2 100644 >> --- a/gcc/testsuite/lib/target-supports.exp >> +++ b/gcc/testsuite/lib/target-supports.exp >> @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { >> }] >> } >> >> +# Return 1 if current target uses soft-float or supports double-precision FP >> +proc check_effective_target_arm_softfp_or_dp { } { >> + if { ![istarget arm*-*-*] } { >> + return 0 >> + } >> + >> + return [check_no_compiler_messages arm_softfp_or_dp assembly { >> + #ifdef __ARM_FP // Not defined => soft float >> + # if ((__ARM_FP & 8) == 0) >> + # error __ARM_FP indicates that double-precision is not supported >> + # endif >> + #endif >> + int main (void) { return 0; } >> + } "" ] >> +} >> + >> # Return 1 if GCC was configured with --with-mode= >> proc check_effective_target_default_mode { } { >> > > I think I'd rather the test be called arm_mixed_fp (ie a mix of hard and softfp). The logic for that is inverted from your current test, but then you don't need the inversion when you use the test for the xfail. > > OK with that change. Pushed as r16-8549-g3d30fc2f73ccc1. I'll pick this for releases/gcc-15 mid next week unless I see a regression report. Kind regards, Torbjörn > > R.
Sorry for the late reply, I have 2 questions: On 4/9/26 16:52, Torbjorn SVENSSON wrote: > > > On 2026-04-08 11:57, Richard Earnshaw (foss) wrote: >> On 07/04/2026 10:23, Torbjörn SVENSSON wrote: >>> Changes since v1: >>> >>> - Limited xfail check to arm* after Linaro CI notification of >>> regression for aarch64-linux-gnu. >>> >>> Ok for trunk and releases/gcc-15? >>> >>> -- >>> >>> gcc/testsuite/ChangeLog: >>> >>> PR testsuite/113276 >>> * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* >>> unless soft float or double-precision FP. >>> * lib/target-supports.exp >>> (check_effective_target_arm_softfp_or_dp): New function. >>> >>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> >>> --- >>> .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- >>> gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ >>> 2 files changed, 17 insertions(+), 1 deletion(-) >>> >>> diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>> b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>> index 1c28a9e101e..7326ae10a9f 100644 >>> --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>> +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>> @@ -1,5 +1,5 @@ >>> /* PR57245 */ >>> -/* { dg-do run } */ >>> +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ >>> /* { dg-require-effective-target fenv } */ >>> /* { dg-require-effective-target hard_float } */ >>> /* { dg-additional-options "-frounding-math" } */ >>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/ >>> lib/target-supports.exp >>> index 3f428ad5817..b61f77233f2 100644 >>> --- a/gcc/testsuite/lib/target-supports.exp >>> +++ b/gcc/testsuite/lib/target-supports.exp >>> @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { >>> }] >>> } >>> +# Return 1 if current target uses soft-float or supports double- >>> precision FP >>> +proc check_effective_target_arm_softfp_or_dp { } { >>> + if { ![istarget arm*-*-*] } { >>> + return 0 >>> + } >>> + >>> + return [check_no_compiler_messages arm_softfp_or_dp assembly { >>> + #ifdef __ARM_FP // Not defined => soft float >>> + # if ((__ARM_FP & 8) == 0) >>> + # error __ARM_FP indicates that double-precision is not supported >>> + # endif >>> + #endif >>> + int main (void) { return 0; } >>> + } "" ] >>> +} >>> + >>> # Return 1 if GCC was configured with --with-mode= >>> proc check_effective_target_default_mode { } { >> >> I think I'd rather the test be called arm_mixed_fp (ie a mix of hard >> and softfp). The logic for that is inverted from your current test, >> but then you don't need the inversion when you use the test for the >> xfail. >> >> OK with that change. > Looks like we all forgot to request an entry in sourcebuild.texi for the new effective-target :-( My other question is more for Richard: I'm confused after reading the PR, arm_softfp_or_dp is the name you suggested there, so you changed your mind to arm_mixed_fp? But don't we want to make sure HW DP is supported? Why do we want this to be OK in the soft-FP case? The testcase has: /* { dg-require-effective-target hard_float } */ Thanks, Christophe > Pushed as r16-8549-g3d30fc2f73ccc1. > > I'll pick this for releases/gcc-15 mid next week unless I see a > regression report. > > Kind regards, > Torbjörn > >> >> R. >
On 2026-04-10 11:30, Christophe Lyon wrote: > Sorry for the late reply, I have 2 questions: > > On 4/9/26 16:52, Torbjorn SVENSSON wrote: >> >> >> On 2026-04-08 11:57, Richard Earnshaw (foss) wrote: >>> On 07/04/2026 10:23, Torbjörn SVENSSON wrote: >>>> Changes since v1: >>>> >>>> - Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu. >>>> >>>> Ok for trunk and releases/gcc-15? >>>> >>>> -- >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>> PR testsuite/113276 >>>> * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* >>>> unless soft float or double-precision FP. >>>> * lib/target-supports.exp >>>> (check_effective_target_arm_softfp_or_dp): New function. >>>> >>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> >>>> --- >>>> .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- >>>> gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ >>>> 2 files changed, 17 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>> index 1c28a9e101e..7326ae10a9f 100644 >>>> --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>> +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>> @@ -1,5 +1,5 @@ >>>> /* PR57245 */ >>>> -/* { dg-do run } */ >>>> +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ >>>> /* { dg-require-effective-target fenv } */ >>>> /* { dg-require-effective-target hard_float } */ >>>> /* { dg-additional-options "-frounding-math" } */ >>>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/ lib/target-supports.exp >>>> index 3f428ad5817..b61f77233f2 100644 >>>> --- a/gcc/testsuite/lib/target-supports.exp >>>> +++ b/gcc/testsuite/lib/target-supports.exp >>>> @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { >>>> }] >>>> } >>>> +# Return 1 if current target uses soft-float or supports double- precision FP >>>> +proc check_effective_target_arm_softfp_or_dp { } { >>>> + if { ![istarget arm*-*-*] } { >>>> + return 0 >>>> + } >>>> + >>>> + return [check_no_compiler_messages arm_softfp_or_dp assembly { >>>> + #ifdef __ARM_FP // Not defined => soft float >>>> + # if ((__ARM_FP & 8) == 0) >>>> + # error __ARM_FP indicates that double-precision is not supported >>>> + # endif >>>> + #endif >>>> + int main (void) { return 0; } >>>> + } "" ] >>>> +} >>>> + >>>> # Return 1 if GCC was configured with --with-mode= >>>> proc check_effective_target_default_mode { } { >>> >>> I think I'd rather the test be called arm_mixed_fp (ie a mix of hard and softfp). The logic for that is inverted from your current test, but then you don't need the inversion when you use the test for the xfail. >>> >>> OK with that change. >> > > Looks like we all forgot to request an entry in sourcebuild.texi for the new effective-target :-( Ouch, missed that one :(. I'll send a followup patch for that shortly. > > My other question is more for Richard: I'm confused after reading the PR, arm_softfp_or_dp is the name you suggested there, so you changed your mind to arm_mixed_fp? > > But don't we want to make sure HW DP is supported? > Why do we want this to be OK in the soft-FP case? > The testcase has: > /* { dg-require-effective-target hard_float } */ When I inverted the logic, the function looks like this: # Return 1 if current target supports both single- and double-precision FP proc check_effective_target_arm_mixed_fp { } { if { ![istarget arm*-*-*] } { return 0 } return [check_no_compiler_messages arm_mixed_fp assembly { #ifndef __ARM_FP # error __ARM_FP not defined #elif ((__ARM_FP & 0xc) == 0xc) # error __ARM_FP indicates that both single- and double-precision FP are supported #endif int main (void) { return 0; } } "" ] } This means, that only the case where FPU is selected and it supports both SP and DP, then the check will succeed. Did I misunderstand the intention of the request to invert here? Kind regards, Torbjörn > > > Thanks, > > Christophe > >> Pushed as r16-8549-g3d30fc2f73ccc1. >> >> I'll pick this for releases/gcc-15 mid next week unless I see a regression report. >> >> Kind regards, >> Torbjörn >> >>> >>> R. >> >
On 10/04/2026 10:30, Christophe Lyon wrote: > Sorry for the late reply, I have 2 questions: > > On 4/9/26 16:52, Torbjorn SVENSSON wrote: >> >> >> On 2026-04-08 11:57, Richard Earnshaw (foss) wrote: >>> On 07/04/2026 10:23, Torbjörn SVENSSON wrote: >>>> Changes since v1: >>>> >>>> - Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu. >>>> >>>> Ok for trunk and releases/gcc-15? >>>> >>>> -- >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>> PR testsuite/113276 >>>> * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* >>>> unless soft float or double-precision FP. >>>> * lib/target-supports.exp >>>> (check_effective_target_arm_softfp_or_dp): New function. >>>> >>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> >>>> --- >>>> .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- >>>> gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ >>>> 2 files changed, 17 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>> index 1c28a9e101e..7326ae10a9f 100644 >>>> --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>> +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>> @@ -1,5 +1,5 @@ >>>> /* PR57245 */ >>>> -/* { dg-do run } */ >>>> +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ >>>> /* { dg-require-effective-target fenv } */ >>>> /* { dg-require-effective-target hard_float } */ >>>> /* { dg-additional-options "-frounding-math" } */ >>>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/ lib/target-supports.exp >>>> index 3f428ad5817..b61f77233f2 100644 >>>> --- a/gcc/testsuite/lib/target-supports.exp >>>> +++ b/gcc/testsuite/lib/target-supports.exp >>>> @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { >>>> }] >>>> } >>>> +# Return 1 if current target uses soft-float or supports double- precision FP >>>> +proc check_effective_target_arm_softfp_or_dp { } { >>>> + if { ![istarget arm*-*-*] } { >>>> + return 0 >>>> + } >>>> + >>>> + return [check_no_compiler_messages arm_softfp_or_dp assembly { >>>> + #ifdef __ARM_FP // Not defined => soft float >>>> + # if ((__ARM_FP & 8) == 0) >>>> + # error __ARM_FP indicates that double-precision is not supported >>>> + # endif >>>> + #endif >>>> + int main (void) { return 0; } >>>> + } "" ] >>>> +} >>>> + >>>> # Return 1 if GCC was configured with --with-mode= >>>> proc check_effective_target_default_mode { } { >>> >>> I think I'd rather the test be called arm_mixed_fp (ie a mix of hard and softfp). The logic for that is inverted from your current test, but then you don't need the inversion when you use the test for the xfail. >>> >>> OK with that change. >> > > Looks like we all forgot to request an entry in sourcebuild.texi for the new effective-target :-( > Oops! I see Torbjorn has already sent something for this. > My other question is more for Richard: I'm confused after reading the PR, arm_softfp_or_dp is the name you suggested there, so you changed your mind to arm_mixed_fp? Seems like it. When looking at the name again it felt unweildy, and the fact that we then had to negate it made things worse. > > But don't we want to make sure HW DP is supported? Becasue the problem cases generally stem from when we have a mix of hard and soft fp in a single environment. Mostly because our software emulation code doesn't handle things like rounding modes or exception bits. I'd expect things to work fine if both single and double-precision use the same 'model'. > Why do we want this to be OK in the soft-FP case? > The testcase has: > /* { dg-require-effective-target hard_float } */ So we already get the effect your describing. I don't think that's a problem. R. > > > Thanks, > > Christophe > >> Pushed as r16-8549-g3d30fc2f73ccc1. >> >> I'll pick this for releases/gcc-15 mid next week unless I see a regression report. >> >> Kind regards, >> Torbjörn >> >>> >>> R. >> >
On 10/04/2026 10:47, Torbjorn SVENSSON wrote: > > > On 2026-04-10 11:30, Christophe Lyon wrote: >> Sorry for the late reply, I have 2 questions: >> >> On 4/9/26 16:52, Torbjorn SVENSSON wrote: >>> >>> >>> On 2026-04-08 11:57, Richard Earnshaw (foss) wrote: >>>> On 07/04/2026 10:23, Torbjörn SVENSSON wrote: >>>>> Changes since v1: >>>>> >>>>> - Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu. >>>>> >>>>> Ok for trunk and releases/gcc-15? >>>>> >>>>> -- >>>>> >>>>> gcc/testsuite/ChangeLog: >>>>> >>>>> PR testsuite/113276 >>>>> * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* >>>>> unless soft float or double-precision FP. >>>>> * lib/target-supports.exp >>>>> (check_effective_target_arm_softfp_or_dp): New function. >>>>> >>>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> >>>>> --- >>>>> .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- >>>>> gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ >>>>> 2 files changed, 17 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>>> index 1c28a9e101e..7326ae10a9f 100644 >>>>> --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>>> +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>>> @@ -1,5 +1,5 @@ >>>>> /* PR57245 */ >>>>> -/* { dg-do run } */ >>>>> +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ >>>>> /* { dg-require-effective-target fenv } */ >>>>> /* { dg-require-effective-target hard_float } */ >>>>> /* { dg-additional-options "-frounding-math" } */ >>>>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/ lib/target-supports.exp >>>>> index 3f428ad5817..b61f77233f2 100644 >>>>> --- a/gcc/testsuite/lib/target-supports.exp >>>>> +++ b/gcc/testsuite/lib/target-supports.exp >>>>> @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { >>>>> }] >>>>> } >>>>> +# Return 1 if current target uses soft-float or supports double- precision FP >>>>> +proc check_effective_target_arm_softfp_or_dp { } { >>>>> + if { ![istarget arm*-*-*] } { >>>>> + return 0 >>>>> + } >>>>> + >>>>> + return [check_no_compiler_messages arm_softfp_or_dp assembly { >>>>> + #ifdef __ARM_FP // Not defined => soft float >>>>> + # if ((__ARM_FP & 8) == 0) >>>>> + # error __ARM_FP indicates that double-precision is not supported >>>>> + # endif >>>>> + #endif >>>>> + int main (void) { return 0; } >>>>> + } "" ] >>>>> +} >>>>> + >>>>> # Return 1 if GCC was configured with --with-mode= >>>>> proc check_effective_target_default_mode { } { >>>> >>>> I think I'd rather the test be called arm_mixed_fp (ie a mix of hard and softfp). The logic for that is inverted from your current test, but then you don't need the inversion when you use the test for the xfail. >>>> >>>> OK with that change. >>> >> >> Looks like we all forgot to request an entry in sourcebuild.texi for the new effective-target :-( > > Ouch, missed that one :(. I'll send a followup patch for that shortly. > >> >> My other question is more for Richard: I'm confused after reading the PR, arm_softfp_or_dp is the name you suggested there, so you changed your mind to arm_mixed_fp? >> >> But don't we want to make sure HW DP is supported? >> Why do we want this to be OK in the soft-FP case? >> The testcase has: >> /* { dg-require-effective-target hard_float } */ > > When I inverted the logic, the function looks like this: > > # Return 1 if current target supports both single- and double-precision FP > proc check_effective_target_arm_mixed_fp { } { > if { ![istarget arm*-*-*] } { > return 0 > } > > return [check_no_compiler_messages arm_mixed_fp assembly { > #ifndef __ARM_FP > # error __ARM_FP not defined > #elif ((__ARM_FP & 0xc) == 0xc) > # error __ARM_FP indicates that both single- and double-precision FP are supported > #endif > int main (void) { return 0; } > } "" ] > } > I would have thought this could be simplified to // Mixed FP means we have hw FP, but only for SFmode (ignores HFmode) #if !defined(__ARM_FP) || (__ARM_FP & 0xc) != 0x4) #error Not mixed FP #endif R. > > This means, that only the case where FPU is selected and it supports both SP and DP, then the check will succeed. > > Did I misunderstand the intention of the request to invert here? > > Kind regards, > Torbjörn > >> >> >> Thanks, >> >> Christophe >> >>> Pushed as r16-8549-g3d30fc2f73ccc1. >>> >>> I'll pick this for releases/gcc-15 mid next week unless I see a regression report. >>> >>> Kind regards, >>> Torbjörn >>> >>>> >>>> R. >>> >> >
On 2026-04-10 13:11, Richard Earnshaw (foss) wrote: > On 10/04/2026 10:47, Torbjorn SVENSSON wrote: >> >> >> On 2026-04-10 11:30, Christophe Lyon wrote: >>> Sorry for the late reply, I have 2 questions: >>> >>> On 4/9/26 16:52, Torbjorn SVENSSON wrote: >>>> >>>> >>>> On 2026-04-08 11:57, Richard Earnshaw (foss) wrote: >>>>> On 07/04/2026 10:23, Torbjörn SVENSSON wrote: >>>>>> Changes since v1: >>>>>> >>>>>> - Limited xfail check to arm* after Linaro CI notification of regression for aarch64-linux-gnu. >>>>>> >>>>>> Ok for trunk and releases/gcc-15? >>>>>> >>>>>> -- >>>>>> >>>>>> gcc/testsuite/ChangeLog: >>>>>> >>>>>> PR testsuite/113276 >>>>>> * gcc.dg/torture/fp-double-convert-float-1.c: Xfail test for arm* >>>>>> unless soft float or double-precision FP. >>>>>> * lib/target-supports.exp >>>>>> (check_effective_target_arm_softfp_or_dp): New function. >>>>>> >>>>>> Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com> >>>>>> --- >>>>>> .../gcc.dg/torture/fp-double-convert-float-1.c | 2 +- >>>>>> gcc/testsuite/lib/target-supports.exp | 16 ++++++++++++++++ >>>>>> 2 files changed, 17 insertions(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>>>> index 1c28a9e101e..7326ae10a9f 100644 >>>>>> --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>>>> +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c >>>>>> @@ -1,5 +1,5 @@ >>>>>> /* PR57245 */ >>>>>> -/* { dg-do run } */ >>>>>> +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ >>>>>> /* { dg-require-effective-target fenv } */ >>>>>> /* { dg-require-effective-target hard_float } */ >>>>>> /* { dg-additional-options "-frounding-math" } */ >>>>>> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/ lib/target-supports.exp >>>>>> index 3f428ad5817..b61f77233f2 100644 >>>>>> --- a/gcc/testsuite/lib/target-supports.exp >>>>>> +++ b/gcc/testsuite/lib/target-supports.exp >>>>>> @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { >>>>>> }] >>>>>> } >>>>>> +# Return 1 if current target uses soft-float or supports double- precision FP >>>>>> +proc check_effective_target_arm_softfp_or_dp { } { >>>>>> + if { ![istarget arm*-*-*] } { >>>>>> + return 0 >>>>>> + } >>>>>> + >>>>>> + return [check_no_compiler_messages arm_softfp_or_dp assembly { >>>>>> + #ifdef __ARM_FP // Not defined => soft float >>>>>> + # if ((__ARM_FP & 8) == 0) >>>>>> + # error __ARM_FP indicates that double-precision is not supported >>>>>> + # endif >>>>>> + #endif >>>>>> + int main (void) { return 0; } >>>>>> + } "" ] >>>>>> +} >>>>>> + >>>>>> # Return 1 if GCC was configured with --with-mode= >>>>>> proc check_effective_target_default_mode { } { >>>>> >>>>> I think I'd rather the test be called arm_mixed_fp (ie a mix of hard and softfp). The logic for that is inverted from your current test, but then you don't need the inversion when you use the test for the xfail. >>>>> >>>>> OK with that change. >>>> >>> >>> Looks like we all forgot to request an entry in sourcebuild.texi for the new effective-target :-( >> >> Ouch, missed that one :(. I'll send a followup patch for that shortly. >> >>> >>> My other question is more for Richard: I'm confused after reading the PR, arm_softfp_or_dp is the name you suggested there, so you changed your mind to arm_mixed_fp? >>> >>> But don't we want to make sure HW DP is supported? >>> Why do we want this to be OK in the soft-FP case? >>> The testcase has: >>> /* { dg-require-effective-target hard_float } */ >> >> When I inverted the logic, the function looks like this: >> >> # Return 1 if current target supports both single- and double-precision FP >> proc check_effective_target_arm_mixed_fp { } { >> if { ![istarget arm*-*-*] } { >> return 0 >> } >> >> return [check_no_compiler_messages arm_mixed_fp assembly { >> #ifndef __ARM_FP >> # error __ARM_FP not defined >> #elif ((__ARM_FP & 0xc) == 0xc) >> # error __ARM_FP indicates that both single- and double-precision FP are supported >> #endif >> int main (void) { return 0; } >> } "" ] >> } >> > > I would have thought this could be simplified to > > // Mixed FP means we have hw FP, but only for SFmode (ignores HFmode) > #if !defined(__ARM_FP) || (__ARM_FP & 0xc) != 0x4) > #error Not mixed FP > #endif Well, that's a different way to describe the same state. My way detects that DP is set but SP is not. Maybe that's not a case we need to worry about? Kind regards, Torbjörn > > > R. > >> >> This means, that only the case where FPU is selected and it supports both SP and DP, then the check will succeed. >> >> Did I misunderstand the intention of the request to invert here? >> >> Kind regards, >> Torbjörn >> >>> >>> >>> Thanks, >>> >>> Christophe >>> >>>> Pushed as r16-8549-g3d30fc2f73ccc1. >>>> >>>> I'll pick this for releases/gcc-15 mid next week unless I see a regression report. >>>> >>>> Kind regards, >>>> Torbjörn >>>> >>>>> >>>>> R. >>>> >>> >> >
diff --git a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c index 1c28a9e101e..7326ae10a9f 100644 --- a/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c +++ b/gcc/testsuite/gcc.dg/torture/fp-double-convert-float-1.c @@ -1,5 +1,5 @@ /* PR57245 */ -/* { dg-do run } */ +/* { dg-do run { xfail { arm*-*-* && { ! arm_softfp_or_dp } } } } */ /* { dg-require-effective-target fenv } */ /* { dg-require-effective-target hard_float } */ /* { dg-additional-options "-frounding-math" } */ diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 3f428ad5817..b61f77233f2 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -6352,6 +6352,22 @@ foreach { armfunc armflag armdefs } { }] } +# Return 1 if current target uses soft-float or supports double-precision FP +proc check_effective_target_arm_softfp_or_dp { } { + if { ![istarget arm*-*-*] } { + return 0 + } + + return [check_no_compiler_messages arm_softfp_or_dp assembly { + #ifdef __ARM_FP // Not defined => soft float + # if ((__ARM_FP & 8) == 0) + # error __ARM_FP indicates that double-precision is not supported + # endif + #endif + int main (void) { return 0; } + } "" ] +} + # Return 1 if GCC was configured with --with-mode= proc check_effective_target_default_mode { } {