2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / allocate_with_typespec_5.f90
blob1f8b3d6c4d27d4fb423f23e8b82f02178b397afa
1 ! { dg-do compile }
3 ! PR fortran/51652
5 ! Contributed by David Kinniburgh
7 module settings
9 type keyword
10 character(60), allocatable :: c(:)
11 end type keyword
13 type(keyword) :: kw(10)
15 contains
17 subroutine save_kw
18 allocate(character(80) :: kw(1)%c(10)) ! { dg-error "with type-spec requires the same character-length parameter" }
19 end subroutine save_kw
21 subroutine 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" }
24 end subroutine foo
26 end module settings