This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30834] ICE with kind=8 exponentiaton
- From: "tkoenig at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Feb 2007 21:27:06 -0000
- Subject: [Bug fortran/30834] ICE with kind=8 exponentiaton
- References: <bug-30834-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #5 from tkoenig at gcc dot gnu dot org 2007-02-17 21:27 -------
> After looking at this a little bit, I think we may want to
> change the error message to report the invalid integer exponent
> value and document that INT_MIN <= e <= INT_MAX. Why? Well,
> other than the special values of 1 and 0, the evaluation of
> x**e will exceed the range of x.
I don't think this is the case:
$ cat foo.f90
program main
real(kind=8) :: a
integer(kind=8) :: n
n = 2_8**32
a = 1_8 + epsilon(a)
print *,a**n
end program main
$ gfortran foo.f90
$ ./a.out
1.00000095367477
I do admit this is a corner case, though :-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30834