1! { dg-do compile }
2!
3! PR fortran/51652
4!
5! Contributed by David Kinniburgh
6!
7module settings
8
9type keyword
10  character(60), allocatable :: c(:)
11end type keyword
12
13type(keyword) :: kw(10)
14
15contains
16
17subroutine save_kw
18  allocate(character(80) :: kw(1)%c(10)) ! { dg-error "with type-spec requires the same character-length parameter" }
19end subroutine save_kw
20
21subroutine foo(n)
22  character(len=n+2), allocatable :: x
23  allocate (character(len=n+3) :: x) ! { dg-error "type-spec requires the same character-length parameter" }
24end subroutine foo
25
26end module settings
27