2017-12-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / size_kind.f90
blobee9cb8f246ffaac3167546be9c8371c23ebf97bd
1 ! { dg-do compile }
3 ! PR fortran/36153
4 ! Contributed by Jonathan Hogg
5 !
6 program test_64
7 implicit none
9 integer, parameter :: long = selected_int_kind(18)
10 integer, parameter :: short = kind(0)
12 integer(long), parameter :: big_sz = huge(0_short)+1000_long
13 integer(long), parameter :: max_32 = huge(0_short)
14 integer, dimension(:), allocatable :: array
16 integer(long) :: i
18 print *, "2**31 = ", 2_long**31
19 print *, "max_32 = ", max_32
20 print *, "big_sz = ", big_sz
22 ! Disabled as it overflows on 32bit systems (at compile time)
23 ! (conversion of integer(8) to integer(4))
24 ! allocate(array(big_sz))
25 print *, "sz = ", size(array)
26 print *, "sz = ", size(array, kind=long)
27 end program