summaryrefslogtreecommitdiff
path: root/libgfortran/m4
diff options
context:
space:
mode:
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-04 08:03:34 +0000
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>2007-03-04 08:03:34 +0000
commita6f8dac9f4e73f6a816a784eb6a81cfe41c8fcae (patch)
treea61d8416540e00b4c26389a23d6836b40ab750f5 /libgfortran/m4
parent608ae6a84a7e227cd5ef57728b949b5db9beed0c (diff)
downloadgcc-a6f8dac9f4e73f6a816a784eb6a81cfe41c8fcae.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122522 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/m4')
-rw-r--r--libgfortran/m4/pow.m410
1 files changed, 7 insertions, 3 deletions
diff --git a/libgfortran/m4/pow.m4 b/libgfortran/m4/pow.m4
index ae490040c65..54e2fda03c2 100644
--- a/libgfortran/m4/pow.m4
+++ b/libgfortran/m4/pow.m4
@@ -46,7 +46,8 @@ rtype_name
`pow_'rtype_code`_'atype_code (rtype_name a, atype_name b)
{
rtype_name pow, x;
- atype_name n, u;
+ atype_name n;
+ `GFC_UINTEGER_'atype_kind` u;'
n = b;
x = a;
@@ -62,11 +63,14 @@ ifelse(rtype_letter,i,`dnl
return (n & 1) ? -1 : 1;
return (x == 0) ? 1 / x : 0;
',`
- n = -n;
+ u = -n;
x = pow / x;
')dnl
}
- u = n;
+ else
+ {
+ u = n;
+ }
for (;;)
{
if (u & 1)