3 ! Contributed by Walter Spector <w6ws at earthlink dot net>
9 subroutine cls_alloc (n
, str
)
10 integer, intent(in
) :: n
11 character(*), allocatable
, intent(out
) :: str
12 ! Note: Star ^ should have been a colon (:)
14 allocate (character(n
)::str
)
24 character(:), allocatable
:: s
26 call cls_alloc(42, s
) ! { dg-error "allocatable or pointer dummy argument" }
27 print *, 'string len =', len(s
)