projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dd8a243
)
[flang] Only apply PointerIsAssociatedWith fix for derived-type
author
Valentin Clement
<clementval@gmail.com>
Thu, 9 Mar 2023 15:05:57 +0000
(16:05 +0100)
committer
Valentin Clement
<clementval@gmail.com>
Thu, 9 Mar 2023 15:06:34 +0000
(16:06 +0100)
Only apply the change made in D145604 for derived-type.
zero-sized character for example are supposed to give a false result
Reviewed By: PeteSteinfeld
Differential Revision: https://reviews.llvm.org/D145675
flang/runtime/pointer.cpp
patch
|
blob
|
history
diff --git
a/flang/runtime/pointer.cpp
b/flang/runtime/pointer.cpp
index
a0a11e9
..
216e8c7
100644
(file)
--- a/
flang/runtime/pointer.cpp
+++ b/
flang/runtime/pointer.cpp
@@
-206,7
+206,8
@@
bool RTNAME(PointerIsAssociatedWith)(
if (!target) {
return pointer.raw().base_addr != nullptr;
}
- if (!target->raw().base_addr) {
+ if (!target->raw().base_addr ||
+ (target->raw().type != CFI_type_struct && target->ElementBytes() == 0)) {
return false;
}
int rank{pointer.rank()};