1! { dg-do compile }
2!
3! PR fortran/47531
4!
5! Contributed by James Van Buskirk
6!
7! Check for the presence of the optional kind= argument
8! of F2003.
9!
10
11program bug1
12   use ISO_C_BINDING
13   implicit none
14   real,allocatable :: weevil(:,:)
15
16   write(*,*) achar(64,C_CHAR)
17   write(*,*) char(64,C_CHAR)
18   write(*,*) iachar('A',C_INTPTR_T)
19   write(*,*) ichar('A',C_INTPTR_T)
20   write(*,*) len('A',C_INTPTR_T)
21   write(*,*) len_trim('A',C_INTPTR_T)
22   allocate(weevil(2,2))
23   weevil = 42
24   write(*,*) ceiling(weevil,C_INTPTR_T)
25   write(*,*) floor(weevil,C_INTPTR_T)
26   write(*,*) shape(weevil,C_INTPTR_T)
27   write(*,*) storage_size(weevil,C_INTPTR_T)
28end program bug1
29
30