OSDN Git Service

2011-09-26 Janus Weil <janus@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / shape_6.f90
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
11 program 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)
28 end program bug1
29