Skip to content

Commit 77ab08e

Browse files
committed
[flang][runtime] fix buildbot failure after #69199
Fix https://lab.llvm.org/buildbot/#/builders/268/builds/360
1 parent bef3e8e commit 77ab08e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

flang/include/flang/Runtime/descriptor.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,8 @@ class Descriptor {
393393
bool stridesAreContiguous{true};
394394
for (int j{0}; j < leadingDimensions; ++j) {
395395
const Dimension &dim{GetDimension(j)};
396-
stridesAreContiguous &= (bytes == dim.ByteStride()) | (dim.Extent() == 1);
396+
stridesAreContiguous &=
397+
(bytes == dim.ByteStride()) || (dim.Extent() == 1);
397398
bytes *= dim.Extent();
398399
}
399400
// One and zero element arrays are contiguous even if the descriptor

flang/runtime/ISO_Fortran_binding.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ RT_API_ATTRS int CFI_is_contiguous(const CFI_cdesc_t *descriptor) {
130130
CFI_index_t bytes = descriptor->elem_len;
131131
for (int j{0}; j < descriptor->rank; ++j) {
132132
stridesAreContiguous &=
133-
(bytes == descriptor->dim[j].sm) | (descriptor->dim[j].extent == 1);
133+
(bytes == descriptor->dim[j].sm) || (descriptor->dim[j].extent == 1);
134134
bytes *= descriptor->dim[j].extent;
135135
}
136136
if (stridesAreContiguous || bytes == 0) {

0 commit comments

Comments
 (0)