This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Fortran, trunk, committed] Fix PR fortran/8587.
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 20 Nov 2002 00:25:15 +0100
- Subject: [Fortran, trunk, committed] Fix PR fortran/8587.
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
L.S.,
The attached patch was committed to the trunk after make bootstrap, make
dvi, make -k check-g77 on powerpc-unknown-linux-gnu.
It fixes PR fortran/8587.
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/8587
* libF77/pow_zz.c: Handle (0.0, 0.0) ** power.
*** pow_zz.c.orig Sat Jun 1 14:38:28 2002
--- pow_zz.c Tue Nov 19 22:18:53 2002
*************** pow_zz (doublecomplex * r, doublecomplex
*** 9,12 ****
--- 9,18 ----
double logr, logi, x, y;
+ if (a->r == 0.0 && a->i == 0.0)
+ {
+ /* Algorithm below doesn't cope. */
+ r->r = r->i = 0.0;
+ return;
+ }
logr = log (f__cabs (a->r, a->i));
logi = atan2 (a->i, a->r);
2002-11-19 Toon Moene <toon@moene.indiv.nluug.nl>
PR fortran/8587
* news.texi: Show PR fortran/8587 fixed.
*** news.texi.orig Sat Nov 2 15:39:44 2002
--- news.texi Tue Nov 19 22:23:38 2002
***************
*** 11,15 ****
@set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002
! @set last-update-news 2002-11-02
@include root.texi
--- 11,15 ----
@set copyrights-news 1995,1996,1997,1998,1999,2000,2001,2002
! @set last-update-news 2002-11-19
@include root.texi
*************** gave wrong results)
*** 182,185 ****
--- 182,187 ----
@item 7388
Incorrect output with 0-based array of characters
+ @item 8587
+ Double complex zero ** double precision number -> NaN instead of zero
@end table
@item