Issue |
153032
|
Summary |
[flang] Incorrect intrinsic assignment of derived type parent component
|
Labels |
flang:frontend
|
Assignees |
|
Reporter |
DanielCChen
|
Consider the following reducer.
```
type t
integer :: a
end type
type, extends(t) :: t2
integer :: b
end type
type(t), allocatable :: a(:)
class(t), allocatable :: b(:)
allocate(b(5), source=(/t2(1,1),t2(2,2),t2(3,3),t2(4,4),t2(5,5)/))
a = b !! a should get b%a
print*, a%a
if (any(a%a /= (/1,2,3,4,5/))) stop 2
end
```
Flang failed to assign `b%a` to `a%a` in intrinsic assignment `a = b`.
gfortran and XLF works fine.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs