[flang] [llvm] [Flang] Adding lowering for the allocation and deallocation of coarrays (PR #182110)
Dan Bonachea via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 19 08:59:30 PST 2026
================
@@ -0,0 +1,45 @@
+//===-- runtime/coarray.cpp -----------------------------------------------===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "flang/Runtime/coarray.h"
+#include "flang-rt/runtime/descriptor.h"
+#include "flang-rt/runtime/terminator.h"
+#include "flang-rt/runtime/type-info.h"
+
+namespace Fortran::runtime {
+
+extern "C" {
+RT_EXT_API_GROUP_BEGIN
+
+void RTDEF(ComputeLastUcobound)(
+ int num_images, const Descriptor &lcobounds, const Descriptor &ucobounds) {
----------------
bonachea wrote:
I'll mention for the benefit of other reviewers:
This PR has made us realize the allocation calling convention for trailing ucobound is inelegant (and inefficient). We are currently working towards a PRIF extension that would obviate the need for this runtime function, but that's not quite ready yet.
https://github.com/llvm/llvm-project/pull/182110
More information about the llvm-commits
mailing list