1! { dg-do run }
2! PR 15140: we used to fail an assertion, because we don't use the
3! argument of the subroutine directly, but instead use a copy of it.
4function M(NAMES)
5  CHARACTER*(*) NAMES(*)
6  if (any(names(1:2).ne."asdfg")) call abort
7  m = LEN(NAMES(1))
8END function M
9
10character(5) :: c(2)
11c = "asdfg"
12if(m(c).ne.5) call abort()
13end
14