[flang-commits] [flang] [llvm] [flang] Implement 'F_C_STRING' library function (Fortran 2023) (PR #174474)

via flang-commits flang-commits at lists.llvm.org
Mon Feb 9 01:43:39 PST 2026


================
@@ -843,6 +843,26 @@ void RTDEF(Repeat)(Descriptor &result, const Descriptor &string,
   }
 }
 
+// F_C_STRING - Appends null terminator to create C-compatible string
+// If asis is false, trailing blanks are trimmed first
+void RTDEF(FCString)(Descriptor &result, const Descriptor &string,
+    const Descriptor *asis, const char *sourceFile, int sourceLine) {
----------------
jeanPerier wrote:

I do not see a deep reason for ASIS to be a descriptor, this makes both the runtime and generated code more complex. Please consider making a `bool asis = false` argument like is done for the "back" argument of FINDLOC.

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


More information about the flang-commits mailing list