Skip to content
Merged
Changes from all 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
6 changes: 4 additions & 2 deletions flang-rt/lib/runtime/pointer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,10 @@ 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 ||
target->Elements() == 0) {
// 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