summaryrefslogtreecommitdiffstats
path: root/bignum.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-16 18:59:31 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-12-16 18:59:31 +0000
commit405e67f71d2e7325943d08f785bbbcb38c05a8db (patch)
tree03aab93450a94447b86c02fa4b0b159f2e10ac6c /bignum.c
parent13c2f278d8812fc960caf678f7041cbe7549ca3a (diff)
downloadruby-405e67f71d2e7325943d08f785bbbcb38c05a8db.tar.gz
ruby-405e67f71d2e7325943d08f785bbbcb38c05a8db.tar.xz
ruby-405e67f71d2e7325943d08f785bbbcb38c05a8db.zip
* bignum.c (rb_big_rshift): fix a GC problem on
IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 536779bb4..425676d32 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1855,6 +1855,7 @@ rb_big_rshift(x, y)
VALUE z;
BDIGIT_DBL num = 0;
long i, j;
+ volatile VALUE save_x;
if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
@@ -1865,7 +1866,7 @@ rb_big_rshift(x, y)
return INT2FIX(-1);
}
if (!RBIGNUM(x)->sign) {
- x = rb_big_clone(x);
+ save_x = x = rb_big_clone(x);
get2comp(x);
}
xds = BDIGITS(x);