1! { dg-do compile }
2! PR fortran/32599
3! Verifies that character string arguments to a bind(c) procedure have length 
4! 1, or no len is specified.  
5module pr32599
6  interface
7     subroutine destroy(path) BIND(C) ! { dg-error "must be length 1" }
8       use iso_c_binding
9       implicit none
10       character(len=*,kind=c_char), intent(IN) :: path 
11     end subroutine destroy
12
13     subroutine create(path) BIND(C) ! { dg-error "must be length 1" }
14       use iso_c_binding
15       implicit none
16       character(len=5,kind=c_char), intent(IN) :: path 
17     end subroutine create
18
19     ! This should be valid.
20     subroutine create1(path) BIND(C)
21       use iso_c_binding
22       implicit none
23       character(len=1,kind=c_char), intent(IN) :: path 
24     end subroutine create1
25
26     ! This should be valid.
27     subroutine create2(path) BIND(C)
28       use iso_c_binding
29       implicit none
30       character(kind=c_char), intent(IN) :: path
31     end subroutine create2
32
33     ! This should be valid.
34     subroutine create3(path) BIND(C)
35       use iso_c_binding
36       implicit none
37       character(kind=c_char), dimension(*), intent(IN) :: path
38     end subroutine create3
39  end interface
40end module pr32599
41