1! { dg-do run }
2! PR 15234
3! tests for passing arrays of assumed length characters
4program strarray_6
5character(5), dimension(:), allocatable :: c
6n = 3
7allocate(c(-1:n-2))
8c = "BLUBB"
9call foo(c)
10call bar(c,n)
11deallocate(c)
12contains
13subroutine foo(x)
14  character (len = *), dimension(:) :: x
15  if (any (x .ne. "BLUBB")) CALL abort()
16end subroutine foo
17end
18
19subroutine bar(x,n)
20  character (len = *), dimension(n) :: x
21  if (any (x .ne. "BLUBB")) CALL abort()
22end subroutine bar
23