[flang-commits] [flang] [llvm] [flang-rt] Split large unformatted sequential records into subrecords (PR #213003)

via flang-commits flang-commits at lists.llvm.org
Wed Oct 21 21:47:44 PDT 2026


================
@@ -117,6 +117,17 @@ restore the unconditional whole-object copy-out. Note that this restores
 stores of unmodified data as well (including into read-only storage), so it
 is an escape hatch and A/B-comparison aid, not a safer mode.
 
+## `FLANG_RT_MAX_SUBRECORD_LENGTH`
+
+Set to an integer value to limit the number of payload bytes that the runtime
+places in one subrecord of an unformatted sequential record
+A record longer than this limit is written as a chain of subrecords whose
+4-byte length markers are negative when another subrecord follows, which is
+the layout that gfortran uses.
+The default, which also applies when the value is not a positive integer no
+greater than 2147483639, is the largest length that a signed 32-bit marker
+can describe; records shorter than that keep a single header and footer.
----------------
ejose02 wrote:

Fixed the missing period, documented header and footer sign rules, and set the default to 2147483639.

https://github.com/llvm/llvm-project/pull/213003


More information about the flang-commits mailing list