[flang-commits] [flang] [Flang][OpenMP] Fix crash and IR errors for user-defined reduction on allocatable variables (PR #186765)
via flang-commits
flang-commits at lists.llvm.org
Mon Mar 16 03:21:15 PDT 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 cpp -- flang/lib/Lower/Support/ReductionProcessor.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/lib/Lower/Support/ReductionProcessor.cpp b/flang/lib/Lower/Support/ReductionProcessor.cpp
index 078d8f24d..5960e9842 100644
--- a/flang/lib/Lower/Support/ReductionProcessor.cpp
+++ b/flang/lib/Lower/Support/ReductionProcessor.cpp
@@ -807,7 +807,7 @@ bool ReductionProcessor::processReductionArguments(
if (isByRef) {
// User-defined reduction on allocatable/pointer variable-
// we need a new declare_reduction for the boxed type, reusing
- // the init value and combiner from the existing one.
+ // the init value and combiner from the existing one.
semantics::Symbol *sym = reductionIntrinsic->v.sym();
std::string baseName = sym->name().ToString();
mlir::ModuleOp module = builder.getModule();
@@ -1046,4 +1046,3 @@ int ReductionProcessor::getOperationIdentity(ReductionIdentifier redId,
} // namespace omp
} // namespace lower
} // namespace Fortran
-
``````````
</details>
https://github.com/llvm/llvm-project/pull/186765
More information about the flang-commits
mailing list