5 ! Contributed by urbanjost and Jerry DeLisle
8 character(len
=:),allocatable
:: strings(:)
10 strings
=[character(len
=2) :: 'AA','BB']
11 write(*,*)strings(:)(:) ! { dg-error "Substring reference of nonscalar not permitted" }
12 !strings(:)(:) ! Parse error: "Invalid character in name"
13 strings(:)(:) = 'x' ! { dg-error "Substring reference of nonscalar not permitted" }
15 write(*,*)strings(i
)(:) ! This is valid and works