diff options
author | Slava Zakharin <szakharin@nvidia.com> | 2023-09-28 14:05:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-28 14:05:55 -0700 |
commit | 2b2d79fbdf4a69061136ded875ec18b057ba7b2f (patch) | |
tree | 57125425541ed2d13b574d07f35e5e2576cc9aef /clang/lib/Basic/SourceManager.cpp | |
parent | da28593d71a8581bdcf6b99346e1cd625076aaff (diff) | |
download | llvm-2b2d79fbdf4a69061136ded875ec18b057ba7b2f.zip llvm-2b2d79fbdf4a69061136ded875ec18b057ba7b2f.tar.gz llvm-2b2d79fbdf4a69061136ded875ec18b057ba7b2f.tar.bz2 |
[flang][runtime] Establish derived type desc properly. (#67623)
Example:
```
module types
type t
real,allocatable :: c
end type t
contains
function h(x)
class(t),allocatable :: h
...
end function h
subroutine test
type(t),allocatable :: b(:)
allocate(b(2),source=h(2.5))
end subroutine test7
end module type
```
`DoFromSourceAssign` creates two descriptors for initializing
`b(1)` and `b(2)` from the result of `h`. This Create call
creates a descriptor without properly initialized addendum,
so the Assign just does shallow copies of the descriptor
representing result of `h` into `b(1)` and `b(2)`.
I modified Create code to properly establish the descriptor
for derived type case.
I had to keep the `addendum` argument to keep the testing
in `flang/unittests/Runtime/TemporaryStack.cpp`.
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions