Skip to content

Commit ef72557

Browse files
kkwliMark Danial
authored andcommitted
add comment to explain the logic
1 parent 96a3678 commit ef72557

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

flang/runtime/edit-input.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,7 @@ bool EditIntegerInput(
247247
// The value is stored in the lower order bits on big endian platform.
248248
// When memcpy, shift the value to the higher order bit.
249249
auto shft{static_cast<int>(sizeof(value.low())) - kind};
250+
// For kind==8 (i.e. shft==0), the value is stored in low_ in big endian.
250251
if (!isHostLittleEndian && shft >= 0) {
251252
auto l{value.low() << (8 * shft)};
252253
std::memcpy(n, &l, kind);

0 commit comments

Comments
 (0)