[flang-commits] [flang] Allow overriding of CFI_MAX_RANK by conditionally setting it to 15 if… (PR #102048)

via flang-commits flang-commits at lists.llvm.org
Mon Aug 5 12:56:21 PDT 2024


https://github.com/mleair created https://github.com/llvm/llvm-project/pull/102048

it has not already been defined.

>From 708bfaafbb1c27f5968872a38ec2ccb4e55a4428 Mon Sep 17 00:00:00 2001
From: Mark Leair <leairmark at gmail.com>
Date: Mon, 5 Aug 2024 12:46:34 -0700
Subject: [PATCH] Allow overriding of CFI_MAX_RANK by conditionally setting it
 to 15 if it has not already been defined.

---
 flang/include/flang/ISO_Fortran_binding.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/flang/include/flang/ISO_Fortran_binding.h b/flang/include/flang/ISO_Fortran_binding.h
index 85401f50b6849..2263cb2799e1d 100644
--- a/flang/include/flang/ISO_Fortran_binding.h
+++ b/flang/include/flang/ISO_Fortran_binding.h
@@ -32,7 +32,9 @@
 /* 18.5.4 */
 #define CFI_VERSION 20240719
 
+#ifndef CFI_MAX_RANK
 #define CFI_MAX_RANK 15
+#endif
 typedef unsigned char CFI_rank_t;
 
 /* This type is probably larger than a default Fortran INTEGER



More information about the flang-commits mailing list