This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/37458] Too big for its kind integer error



------- Comment #1 from dominiq at lps dot ens dot fr  2008-09-10 10:10 -------
You need something like:

program largeint
  integer,parameter :: k10 = selected_int_kind(10)
  integer(kind=k10) :: i10
  i10 = 9223372036854775807_k10
  write(*,*) huge(i10)==9223372036854775807_k10
end program largeint

otherwise 9223372036854775807 is considered as the default integer(4), hence
the error.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37458


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]