[LLVM] Fix Maintainers.md formatting (NFC)
[llvm-project.git] / flang / test / Semantics / array-constr-len.f90
blob4de9c76c7041c21187b60570de3aa80cadd4f0ea
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! Confirm enforcement of F'2023 7.8 p5
3 subroutine subr(s,n)
4 character*(*) s
5 !ERROR: Array constructor implied DO loop has no iterations and indeterminate character length
6 print *, [(s(1:n),j=1,0)]
7 !ERROR: Array constructor implied DO loop has no iterations and indeterminate character length
8 print *, [(s(1:n),j=0,1,-1)]
9 !ERROR: Array constructor implied DO loop has no iterations and indeterminate character length
10 print *, [(s(1:j),j=1,0)]
11 print *, [(s(1:1),j=1,0)] ! ok
12 print *, [character(2)::(s(1:n),j=1,0)] ! ok
13 print *, [character(n)::(s(1:n),j=1,0)]
14 end