1! { dg-do run }
2! { dg-options "-std=legacy" }
3!
4! Another case of fallout from the original patch for PR14771
5! Testcase by Erik Zeek
6module para
7contains
8   function bobo(n)
9       integer, intent(in) :: n
10       character(len=(n)) :: bobo ! Used to fail here
11       bobo = "1234567890"
12   end function bobo
13end module para
14
15program test
16   use para
17   implicit none
18   character*5 c
19   c = bobo(5)
20   if (c .ne. "12345") call abort
21end program test
22