diff options
author | Thomas Koenig <Thomas.Koenig@online.de> | 2007-03-04 08:03:34 +0000 |
---|---|---|
committer | Thomas Koenig <tkoenig@gcc.gnu.org> | 2007-03-04 08:03:34 +0000 |
commit | 3d1f465aff3484eafd4e10e38bc7f7331a43d0dd (patch) | |
tree | a61d8416540e00b4c26389a23d6836b40ab750f5 /libgfortran/generated/pow_r10_i8.c | |
parent | dda10672f1a0f505dd6f8133a5483b8ee846f233 (diff) | |
download | gcc-3d1f465aff3484eafd4e10e38bc7f7331a43d0dd.zip gcc-3d1f465aff3484eafd4e10e38bc7f7331a43d0dd.tar.gz gcc-3d1f465aff3484eafd4e10e38bc7f7331a43d0dd.tar.bz2 |
re PR fortran/30981 ([4.1 only] a ** exp fails for integer exponents if exp is "-huge()-1" (endless loop))
2007-03-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/30981
* m4/pow_m4: Use appropriate unsigned int type for u.
* generated/pow_c10_i16.c: Regenerated.
* generated/pow_c10_i4.c: Regenerated.
* generated/pow_c10_i8.c: Regenerated.
* generated/pow_c16_i16.c: Regenerated.
* generated/pow_c16_i4.c: Regenerated.
* generated/pow_c16_i8.c: Regenerated.
* generated/pow_c4_i16.c: Regenerated.
* generated/pow_c4_i4.c: Regenerated.
* generated/pow_c4_i8.c: Regenerated.
* generated/pow_c8_i16.c: Regenerated.
* generated/pow_c8_i4.c: Regenerated.
* generated/pow_c8_i8.c: Regenerated.
* generated/pow_i16_i16.c: Regenerated.
* generated/pow_i16_i4.c: Regenerated.
* generated/pow_i16_i8.c: Regenerated.
* generated/pow_i4_i16.c: Regenerated.
* generated/pow_i4_i4.c: Regenerated.
* generated/pow_i4_i8.c: Regenerated.
* generated/pow_i8_i16.c: Regenerated.
* generated/pow_i8_i4.c: Regenerated.
* generated/pow_i8_i8.c: Regenerated.
* generated/pow_r10_i16.c: Regenerated.
* generated/pow_r10_i4.c: Regenerated.
* generated/pow_r10_i8.c: Regenerated.
* generated/pow_r16_i16.c: Regenerated.
* generated/pow_r16_i4.c: Regenerated.
* generated/pow_r16_i8.c: Regenerated.
* generated/pow_r4_i16.c: Regenerated.
* generated/pow_r4_i4.c: Regenerated.
* generated/pow_r4_i8.c: Regenerated.
* generated/pow_r8_i16.c: Regenerated.
* generated/pow_r8_i4.c: Regenerated.
* generated/pow_r8_i8.c: Regenerated.
2007-03-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/30981
* gfortran.dg/integer_exponentiation_1.f90: New test.
From-SVN: r122522
Diffstat (limited to 'libgfortran/generated/pow_r10_i8.c')
-rw-r--r-- | libgfortran/generated/pow_r10_i8.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libgfortran/generated/pow_r10_i8.c b/libgfortran/generated/pow_r10_i8.c index 2e99c60..5a5ecff 100644 --- a/libgfortran/generated/pow_r10_i8.c +++ b/libgfortran/generated/pow_r10_i8.c @@ -45,7 +45,8 @@ GFC_REAL_10 pow_r10_i8 (GFC_REAL_10 a, GFC_INTEGER_8 b) { GFC_REAL_10 pow, x; - GFC_INTEGER_8 n, u; + GFC_INTEGER_8 n; + GFC_UINTEGER_8 u; n = b; x = a; @@ -55,10 +56,13 @@ pow_r10_i8 (GFC_REAL_10 a, GFC_INTEGER_8 b) if (n < 0) { - n = -n; + u = -n; x = pow / x; } - u = n; + else + { + u = n; + } for (;;) { if (u & 1) |