Skip to content
Unverified Commit 87dfec9d authored by Valentin Clement's avatar Valentin Clement
Browse files

[flang] Retrieve rank before updating the pointer

The code is iterating on the rank of the pointer to set the bounds.
If the rank is retrieved after the `pointer = target` it does not
reflect the actual rank of the pointer.

This could happen in code like the following:

```
type t1
  integer :: a
end type

type(t), pointer :: p(:)
class(t), pointer :: q(:,:)
q(0:1,-2:2) => p(10:1:-1)
```

Reviewed By: klausler

Differential Revision: https://reviews.llvm.org/D139327
parent 2b6683fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment