forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flang][runtime] Establish derived type desc properly. (llvm#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`.
- Loading branch information
Showing
2 changed files
with
17 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters