[flang-commits] [flang] [flang] Change c_intmax_t to 64 bit to correspond to intmax_t in C (PR #137208)
Eugene Epshteyn via flang-commits
flang-commits at lists.llvm.org
Thu Apr 24 14:26:49 PDT 2025
https://github.com/eugeneepshteyn updated https://github.com/llvm/llvm-project/pull/137208
>From 8532f76f9e4a9429bf268025c0cee8068e83674a Mon Sep 17 00:00:00 2001
From: Eugene Epshteyn <eepshteyn at nvidia.com>
Date: Thu, 24 Apr 2025 12:04:36 -0400
Subject: [PATCH] [flang] Change c_intmax_t to 64 bit to correspond to intmax_t
in C
gcc, clang, and other C compiles define intmax_t to be 64 bit. Change
flang's definition of c_intmax_t to be compatible.
Fixes #128609
---
flang/module/iso_c_binding.f90 | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/flang/module/iso_c_binding.f90 b/flang/module/iso_c_binding.f90
index 73d712cf3e75c..8e3f78cea51b7 100644
--- a/flang/module/iso_c_binding.f90
+++ b/flang/module/iso_c_binding.f90
@@ -47,11 +47,8 @@ module iso_c_binding
c_long_long = c_int64_t, &
c_signed_char = c_int8_t, &
c_size_t = kind(c_sizeof(1)), &
-#if __powerpc__
+ ! Currently both gcc and clang define intmax_t to be 64 bit.
c_intmax_t = c_int64_t, &
-#else
- c_intmax_t = c_int128_t, &
-#endif
c_intptr_t = c_size_t, &
c_ptrdiff_t = c_size_t
integer, parameter, public :: &
More information about the flang-commits
mailing list