[flang-commits] [flang] [llvm] [Flang] Adding lowering for the allocation and deallocation of coarrays (PR #182110)
via flang-commits
flang-commits at lists.llvm.org
Fri Feb 20 06:50:58 PST 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- flang-rt/lib/runtime/coarray.cpp flang/include/flang/Optimizer/Builder/MIFCommon.h flang/include/flang/Runtime/coarray.h flang/lib/Optimizer/Builder/MIFCommon.cpp flang/include/flang/Lower/MultiImageFortran.h flang/include/flang/Optimizer/Transforms/MIFOpConversion.h flang/lib/Lower/Allocatable.cpp flang/lib/Lower/ConvertVariable.cpp flang/lib/Lower/MultiImageFortran.cpp flang/lib/Optimizer/Dialect/MIF/MIFOps.cpp flang/lib/Optimizer/Transforms/MIFOpConversion.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang-rt/lib/runtime/coarray.cpp b/flang-rt/lib/runtime/coarray.cpp
index 8b239c903..9821213a7 100644
--- a/flang-rt/lib/runtime/coarray.cpp
+++ b/flang-rt/lib/runtime/coarray.cpp
@@ -34,7 +34,7 @@ void RTDEF(ComputeLastUcobound)(
if (corank == 1)
ucobounds_ptr[0] = lcobounds_ptr[0] + num_images - 1;
else if (index < num_images)
- ucobounds_ptr[corank - 1] = lcobounds_ptr[corank - 1] +
+ ucobounds_ptr[corank - 1] = lcobounds_ptr[corank - 1] +
(num_images / index) + (num_images % index != 0) - 1;
else
ucobounds_ptr[corank - 1] = lcobounds_ptr[corank - 1];
``````````
</details>
https://github.com/llvm/llvm-project/pull/182110
More information about the flang-commits
mailing list