[flang-commits] [flang] [flang] build fix (PR #121032)

via flang-commits flang-commits at lists.llvm.org
Mon Dec 23 22:35:48 PST 2024


https://github.com/vdonaldson created https://github.com/llvm/llvm-project/pull/121032

Place floating point environment calls under '#ifdef __USE_GNU'.

>From 4d508e7d7e90306542d806a931c61fafe2a33b03 Mon Sep 17 00:00:00 2001
From: V Donaldson <vdonaldson at nvidia.com>
Date: Mon, 23 Dec 2024 22:33:23 -0800
Subject: [PATCH] [flang] build fix

Place floating point environment calls under '#ifdef __USE_GNU'.
---
 flang/runtime/exceptions.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp
index 1ed00538fef396..2fa2baa2ec84a2 100644
--- a/flang/runtime/exceptions.cpp
+++ b/flang/runtime/exceptions.cpp
@@ -84,7 +84,7 @@ uint32_t RTNAME(MapException)(uint32_t excepts) {
 // Check if the processor has the ability to control whether to halt or
 // continue execution when a given exception is raised.
 bool RTNAME(SupportHalting)([[maybe_unused]] uint32_t except) {
-#if (defined(__arm__) || defined(__aarch64__)) && !defined(_WIN32)
+#ifdef __USE_GNU
   except = RTNAME(MapException)(except);
   int currentSet = fegetexcept(), flipSet, ok;
   if (currentSet & except) {



More information about the flang-commits mailing list