[llvm] [flang] Don't associate pointers with zero sized storage targets (PR #155867)

Peter Klausler via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 28 12:43:07 PDT 2025


================
@@ -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) {
----------------
klausler wrote:

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

https://github.com/llvm/llvm-project/pull/155867


More information about the llvm-commits mailing list