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
type base(k1,k2)
integer(1),kind :: k1
integer(k1),kind :: k2
integer(kind(int(k1,1)+int(k2,k1))),allocatable :: i(:) !! FAIL
!integer(kind(int(k1,1)+int(k2,2))),allocatable :: i(:) !! WORK
end type
type(base(2,2)) :: b1
print*, kind(b1%i)
end
Flang complains:
./t.f:4:30: error: 'kind=' argument must be a constant scalar integer whose value is a supported kind for the intrinsic result type
integer(kind(int(k1,1)+int(k2,k1))),allocatable :: i(:) !! FAIL
If I replace k1 with 2, which is the same value when the type is instantiated, it works.