Skip to content
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions flang-rt/lib/runtime/pointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ bool RTDEF(PointerIsAssociatedWith)(
if (!target) {
return pointer.raw().base_addr != nullptr;
}
if (!target->raw().base_addr ||
(target->raw().type != CFI_type_struct && target->ElementBytes() == 0)) {
if (!target->raw().base_addr || target->ElementBytes() == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about the case of ElementBytes() != 0 but no elements?

// F2023, 16.9.20, p5, case (v)-(vi): don't associate pointers with
// targets that have zero sized storage sequence.
return false;
}
int rank{pointer.rank()};
Expand Down
Loading