[flang-commits] [flang] 13e2200 - [Flang] remove assert using femode_t from AIX (#74500)

via flang-commits flang-commits at lists.llvm.org
Tue Dec 5 14:17:32 PST 2023


Author: madanial0
Date: 2023-12-05T17:17:28-05:00
New Revision: 13e2200fa426faffb62bdaf8b2f1f5699eee1511

URL: https://github.com/llvm/llvm-project/commit/13e2200fa426faffb62bdaf8b2f1f5699eee1511
DIFF: https://github.com/llvm/llvm-project/commit/13e2200fa426faffb62bdaf8b2f1f5699eee1511.diff

LOG: [Flang] remove assert using femode_t from AIX (#74500)

AIX does not have `femode_t` in `<cfenv>` header, removing the assert to
fix build failures

---------

Co-authored-by: Mark Danial <mark.danial at ibm.com>

Added: 
    

Modified: 
    flang/runtime/exceptions.cpp

Removed: 
    


################################################################################
diff  --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp
index 797d0c87e601d..1dbee833884fb 100644
--- a/flang/runtime/exceptions.cpp
+++ b/flang/runtime/exceptions.cpp
@@ -77,12 +77,8 @@ std::int32_t RTNAME(MapException)(int32_t except) {
 
 // Verify that the size of ieee_modes_type and ieee_status_type objects from
 // intrinsic module file __fortran_ieee_exceptions.f90 are large enough to
-// hold femode_t and fenv_t objects, respectively.
-#ifndef _WIN32
-static_assert(
-    sizeof(femode_t) <= sizeof(int) * _FORTRAN_RUNTIME_IEEE_FEMODE_T_EXTENT,
-    "increase ieee_modes_type size");
-#endif
+// hold fenv_t object.
+// TODO: consider femode_t object size comparison once its more mature.
 static_assert(
     sizeof(fenv_t) <= sizeof(int) * _FORTRAN_RUNTIME_IEEE_FENV_T_EXTENT,
     "increase ieee_status_type size");


        


More information about the flang-commits mailing list