1! { dg-do compile }
2! Tests the patch for PR26038 that used to ICE in gfc_trans_allocate
3! for the want of a string_length to pass to the library.
4! Contributed by hjl@lucon.org && Erik Edelmann  <eedelmanncc.gnu.org>
5module moo
6
7contains
8
9    subroutine foo(self)
10        character(*) :: self
11        pointer :: self
12
13        nullify(self)
14        allocate(self)          ! Used to ICE here
15        print *, len(self)
16    end subroutine
17
18end module moo
19
20
21program hum
22
23    use moo
24
25    character(5), pointer :: p
26    character(10), pointer :: q
27
28    call foo(p)
29    call foo(q)
30
31end program hum
32