[flang-commits] [flang] [llvm] [Flang-RT] Change alignment for allocatable and pointer arrays to 64 … (PR #206525)
via flang-commits
flang-commits at lists.llvm.org
Mon Jun 29 09:55:39 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 h,cpp -- flang-rt/include/flang-rt/runtime/allocator-registry.h flang-rt/lib/cuda/allocator.cpp flang-rt/lib/cuda/descriptor.cpp flang-rt/lib/runtime/ISO_Fortran_binding.cpp flang-rt/lib/runtime/descriptor.cpp flang-rt/lib/runtime/pointer.cpp flang-rt/unittests/Runtime/Allocatable.cpp flang-rt/unittests/Runtime/Pointer.cpp flang/include/flang/Runtime/CUDA/allocator.h flang/include/flang/Runtime/allocator-registry-consts.h flang/include/flang/Runtime/pointer.h --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/unittests/Runtime/Allocatable.cpp b/flang-rt/unittests/Runtime/Allocatable.cpp
index 28852362e..48ed886ff 100644
--- a/flang-rt/unittests/Runtime/Allocatable.cpp
+++ b/flang-rt/unittests/Runtime/Allocatable.cpp
@@ -78,7 +78,7 @@ TEST(AllocatableTest, MoveAlloc) {
TEST(AllocatableTest, AllocateArrayIsAligned) {
using Fortran::common::TypeCategory;
#if !defined(_WIN32)
- // Since a single std::malloc result may happen to be 64-byte aligned
+ // Since a single std::malloc result may happen to be 64-byte aligned
// allocate multiple arrays and check that all of them are aligned correctly
constexpr int count{32};
OwningPtr<Descriptor> arrays[count];
diff --git a/flang-rt/unittests/Runtime/Pointer.cpp b/flang-rt/unittests/Runtime/Pointer.cpp
index da1c07f59..1e160ec28 100644
--- a/flang-rt/unittests/Runtime/Pointer.cpp
+++ b/flang-rt/unittests/Runtime/Pointer.cpp
@@ -33,15 +33,15 @@ TEST(Pointer, BasicAllocateDeallocate) {
TEST(Pointer, AllocateArrayIsAligned) {
#if !defined(_WIN32)
- // Since a single std::malloc result may happen to be 64-byte aligned
+ // Since a single std::malloc result may happen to be 64-byte aligned
// allocate multiple arrays and check that all of them are aligned correctly
constexpr int count{32};
OwningPtr<Descriptor> pointers[count];
for (int i{0}; i < count; ++i) {
// REAL(8), POINTER :: p(:)
- pointers[i] = Descriptor::Create(
- TypeCode{Fortran::common::TypeCategory::Real, 8}, 8, nullptr, 1, nullptr,
- CFI_attribute_pointer);
+ pointers[i] =
+ Descriptor::Create(TypeCode{Fortran::common::TypeCategory::Real, 8}, 8,
+ nullptr, 1, nullptr, CFI_attribute_pointer);
// ALLOCATE(p(100))
RTNAME(PointerSetBounds)(*pointers[i], 0, 1, 100);
RTNAME(PointerAllocate)
``````````
</details>
https://github.com/llvm/llvm-project/pull/206525
More information about the flang-commits
mailing list