You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version of flang : 20.0.0(8d550aa0f027eb2cf32850f3905dc1db22317587)/AArch64
When a constructor of derived type with extends (derived type with private attribute is specified in extends) is accessed, a compilation error occurs.
The following are the test program, Flang, Gfortran and ifx compilation/execution result.
snfm0301_027_2.f90:
program main
call test02()
print*,"pass"end program main
module mod2
type,private:: tt
integer:: ip =1
end type tt
type,extends(tt):: ty1
integer:: i1 =1
type(tt) :: i1p = tt(2)
integer,allocatable :: i1a(:)
end type ty1
type(ty1) :: str
end module mod2
subroutinetest02()
use mod2
integer,allocatable :: ia(:)
allocate(ia(10))
ia=2
str=ty1(i1a=ia)
if (str%i1.ne.1) print*,'ng'endsubroutine test02
When a constructor of
derived type
withextends
(derived type
withprivate
attribute is specified inextends
) is accessed, a compilation error occurs.The following are the test program, Flang, Gfortran and ifx compilation/execution result.
snfm0301_027_2.f90:
The text was updated successfully, but these errors were encountered: