Unverified Commit 4235bf7a authored by Valentin Clement's avatar Valentin Clement
Browse files

[flang] Adapt PointerIsAssociatedWith for empty derived-type

When a derived-type as no component, its elem_len will be set to
zero when emboxed. Update the function to let empty derived-type
pointer/target succeed the test.

Example extracted from gfortran test pointer_init_8

```
module m
  type :: c
  end type c
  type, extends(c) :: d
  end type d
  type(c), target :: x
end module

use m
  class(c), pointer :: px => x

  if (.not. associated(px, x))   STOP 1
end
```

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D145604
parent c866855b
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment