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
PROGRAM main
IMPLICIT NONE
TYPE :: DT
CHARACTER(38) :: C = "1234567890abcdefghijklmnopqrstuvwxyz "
CHARACTER(16) :: C1= "543210 abc ABC "
END TYPE
TYPE (DT), PARAMETER :: X(4,4) = DT()
!TYPE (DT), PARAMETER :: X = DT() !! Works fine.
INTEGER(KIND(VERIFY(STRING=X%C, SET=X%C1, KIND=1))) :: &
&TI1(4,4)=VERIFY(STRING=X%C, SET=X%C1, KIND=1)
end
Flang currently failed to compile the above code as
error: Semantic errors in a4.f
./a4.f:13:16: error: Must be a constant value
&TI1(4,4)=VERIFY(STRING=X%C, SET=X%C1, KIND=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The code seems standard conforming. All ifort, gfortran and XLF compile the code successfully. If X is scalar instead of an array, Flang compiles it fine.