mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-17 03:10:26 +08:00
* trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
From-SVN: r86504
This commit is contained in:
parent
9e995780d4
commit
0c8eb9985d
@ -1,3 +1,7 @@
|
||||
2004-08-24 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* trans-const.c (gfc_conv_mpz_to_tree): Fix 64-bit shift warning.
|
||||
|
||||
2004-08-24 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
|
||||
|
||||
* resolve.c (merge_argument_lists): Revert unintentionally
|
||||
|
@ -187,21 +187,22 @@ gfc_conv_mpz_to_tree (mpz_t i, int kind)
|
||||
else if (sizeof (mp_limb_t) == 2 * sizeof (HOST_WIDE_INT))
|
||||
{
|
||||
mp_limb_t limb0 = mpz_getlimbn (i, 0);
|
||||
int count = (sizeof (mp_limb_t) - sizeof (HOST_WIDE_INT)) * CHAR_BIT;
|
||||
int shift = (sizeof (mp_limb_t) - sizeof (HOST_WIDE_INT)) * CHAR_BIT;
|
||||
low = limb0;
|
||||
high = limb0 >> count;
|
||||
high = limb0 >> shift;
|
||||
}
|
||||
else if (sizeof (mp_limb_t) < sizeof (HOST_WIDE_INT))
|
||||
{
|
||||
int shift = sizeof (mp_limb_t) * CHAR_BIT;
|
||||
int n, count = sizeof (HOST_WIDE_INT) / sizeof (mp_limb_t);
|
||||
for (low = n = 0; n < count; ++n)
|
||||
{
|
||||
low <<= sizeof (mp_limb_t) * CHAR_BIT;
|
||||
low <<= shift;
|
||||
low |= mpz_getlimbn (i, n);
|
||||
}
|
||||
for (high = 0; n < 2*count; ++n)
|
||||
for (high = 0, n = count; n < 2*count; ++n)
|
||||
{
|
||||
high <<= sizeof (mp_limb_t) * CHAR_BIT;
|
||||
high <<= shift;
|
||||
high |= mpz_getlimbn (i, n);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user