AArch64: correct constraint on Upl early clobber alternatives
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_char_star_scalar_1.f90
blob305136cd6594d13611f221fa0e47fc5660e03d42
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>
5 module moo
7 contains
9 subroutine foo(self)
10 character(*) :: self
11 pointer :: self
13 nullify(self)
14 allocate(self) ! Used to ICE here
15 print *, len(self)
16 end subroutine
18 end module moo
21 program hum
23 use moo
25 character(5), pointer :: p
26 character(10), pointer :: q
28 call foo(p)
29 call foo(q)
31 end program hum