Skip to content

Commit

Permalink
[flang][runtime] Fixed dimension offset computation for MayAlias.
Browse files Browse the repository at this point in the history
Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D150533
  • Loading branch information
vzakhari committed May 15, 2023
1 parent fee61d5 commit 7c7ffa7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flang/runtime/assign.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ static void MaximalByteOffsetRange(
if (extent > 0) {
auto sm{dim.ByteStride()};
if (sm < 0) {
least += extent * sm;
least += (extent - 1) * sm;
} else {
most += extent * sm;
most += (extent - 1) * sm;
}
}
}
Expand Down

0 comments on commit 7c7ffa7

Please sign in to comment.