[Flang][RISCV] Set vscale_range based off zvl*b (#77277)
[llvm-project.git] / flang / test / Semantics / definable06.f90
blob014a05313519bbb7cf26a20e2ce31ccb9e656251
1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 module m
3 contains
4 elemental subroutine inout(x)
5 integer, intent(inout) :: x
6 end
7 subroutine test
8 integer :: x(2)
9 !ERROR: Left-hand side of assignment is not definable
10 !BECAUSE: Variable has a vector subscript with a duplicated element
11 x([1,1]) = 0
12 !ERROR: Actual argument associated with INTENT(IN OUT) dummy argument 'x=' is not definable
13 !BECAUSE: Variable has a vector subscript with a duplicated element
14 call inout(x([(mod(j-1,2)+1,j=1,10)]))
15 !ERROR: Input variable 'x' is not definable
16 !BECAUSE: Variable has a vector subscript with a duplicated element
17 read (*,*) x([2,2])
18 end
19 end