summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/large_integer_kind_2.f90
blob: 68e64ab8ee43b0b994ccf9c995250718c87c0179 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
! { dg-do run }
! { dg-require-effective-target fortran_large_int }

! Testing library calls on large integer kinds (larger than kind=8)
  implicit none

  integer,parameter :: k = selected_int_kind (range (0_8) + 1)

  integer(kind=k) :: i, j
  integer(8) :: a, b

  i = 0; j = 1; a = i; b = j
  if (i ** j /= a ** b) call abort

end