diff options
author | Valentin Clement <clementval@gmail.com> | 2023-02-08 09:26:12 +0100 |
---|---|---|
committer | Valentin Clement <clementval@gmail.com> | 2023-02-08 09:27:27 +0100 |
commit | b37e35979ad569c052b31c7b9e543cca49346cdc (patch) | |
tree | a097e740d309ac75046157a681ac4e8c197e3b72 /clang/lib/Sema/SemaModule.cpp | |
parent | cf2d374e990e4784c7f2bf3bd66c76bb00843a11 (diff) | |
download | llvm-b37e35979ad569c052b31c7b9e543cca49346cdc.zip llvm-b37e35979ad569c052b31c7b9e543cca49346cdc.tar.gz llvm-b37e35979ad569c052b31c7b9e543cca49346cdc.tar.bz2 |
[flang] Carry over the derived type from MOLD
Derived type from the MOLD was not carried over
to the newly allocated pointer or allocatable.
This may lead to wrong dynamic type when the pointer or allocatable
is polymorphic as shown in the example below:
```
type :: p1
integer :: a
end type
type, extends(p1) :: p2
integer :: b
end type
class(p1), pointer :: p(:)
allocate(p(5), MOLD=p2(1,2))
```
Reviewed By: klausler
Differential Revision: https://reviews.llvm.org/D143525
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions