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 InitExpCharOP
IMPLICIT NONE
INTEGER :: I
CHARACTER(10), PARAMETER :: A(10)= '0123456789'
CHARACTER(LEN=10, KIND=1) :: C1(10)= [(REPEAT(A(I)(1:I),1) // REPEAT(A(I)(I+1:10), 1) , I=1,10)]
END
Flang currently issues an error as:
./a3.f:7:41: error: Initialization expression for 'c1' ([(repeat(a(int(int(i,kind=4),kind=8))(1_8:int(int(i,kind=4),kind=8)),1_8)//repeat(a(int(int(i,kind=4),kind=8))(int(int(i,kind=4)+1_4,kind=8):10_8),1_8),INTEGER(8)::i=1_8,10_8,1_8)]) cannot be computed as a constant value
CHARACTER(LEN=10, KIND=1) :: C1(10)= [(REPEAT(A(I)(1:I),1) // REPEAT(A(I)(I+1:10), 1) , I=1,10)]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The code seems conforming to me.
All ifort, gfortran and XLF compiled it successfully.