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: "fxcoudert 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 Mar 2007 18:45:19 -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 #9 from fxcoudert at gcc dot gnu dot org 2007-03-17 18:45 -------
Created an attachment (id=13222)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13222&action=view)
Proposed patch
I think the attached patch would fix this bug. It's a significant rewrite of
the arith.c code to:
* handle the case of large integer exponents for both complex and real; I do
it by not extracting an int from the exponent, but simply handle the mpz_t
throughout
* rewrite completely the integer**integer case, because it had other
problems, such as the following:
$ cat c.f90
print *, 0**(-1)
end
$ gfortran c.f90
c.f90:0: internal compiler error: Floating point exception
All testcases reported are fixed. I don't have any more time to work on this
now, if one of you want to try the patch on the corner cases you can imagine,
I'd appreciate that.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30834