| Issue |
161887
|
| Summary |
[flang] Structure constructor issue with parent component
|
| Labels |
flang:frontend
|
| Assignees |
|
| Reporter |
DanielCChen
|
Consider the following code:
```
program main
type A
class(*), pointer :: u1(:)
end type
type, extends(A) :: B
end type
type(B), target :: b1
type(A), pointer :: ptr(:)
allocate(ptr(2))
b1 = B(ptr) !! FAIL
! b1 = B(u1=ptr) !! WORK
end program
```
When the `u1` component is of unlimited-poly, Flang seems take `ptr` as the parent component in the structure constructor because it is of type `A`.
However, the standard seems requires component keyword for the parent component.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs