OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [size_kind.f90] - Blame information for rev 724

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
!
3
! PR fortran/36153
4
! Contributed by Jonathan Hogg
5
!
6
program test_64
7
   implicit none
8
 
9
   integer, parameter :: long = selected_int_kind(18)
10
   integer, parameter :: short = kind(0)
11
 
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
15
 
16
   integer(long) :: i
17
 
18
   print *, "2**31  = ", 2_long**31
19
   print *, "max_32 = ", max_32
20
   print *, "big_sz = ", big_sz
21
 
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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.