2 ! PR 58009 - If a vector subscript has two or more elements with the
3 ! same value, an array section with that vector subscript
4 ! shall not appear in a variable definition context.
7 real, dimension(4) :: a
,b
8 real, dimension(1,4) :: c
9 read (*,*) a([1,2,3,2]),i
! { dg-error "Elements with the same value" }
10 read (*,*) c(1,[1,2,3,2]),i
! { dg-error "Elements with the same value" }
11 b([1+i
,1,i
+1,2]) = a
! { dg-error "Elements with the same value" }
12 c(1,[1+i
,1,i
+1,2]) = a
! { dg-error "Elements with the same value" }
13 call foo (a([4,2,1,1])) ! { dg-error "Elements with the same value" }
14 call foo (c(1,[4,2,1,1])) ! { dg-error "Elements with the same value" }
18 real, intent(inout
) :: arg(:)