gcc/ 2011-10-30 Mikael Pettersson PR middle-end/50708 * double-int.c (rshift_double): COUNT must be positive. --- gcc-4.6.2/gcc/double-int.c.~1~ 2010-11-30 17:36:19.000000000 +0100 +++ gcc-4.6.2/gcc/double-int.c 2011-10-30 17:28:29.000000000 +0100 @@ -250,7 +250,7 @@ lshift_double (unsigned HOST_WIDE_INT l1 } /* Shift the doubleword integer in L1, H1 right by COUNT places - keeping only PREC bits of result. Shift left if COUNT is negative. + keeping only PREC bits of result. COUNT must be positive. ARITH nonzero specifies arithmetic shifting; otherwise use logical shift. Store the value as two `HOST_WIDE_INT' pieces in *LV and *HV. */ @@ -262,12 +262,6 @@ rshift_double (unsigned HOST_WIDE_INT l1 { unsigned HOST_WIDE_INT signmask; - if (count < 0) - { - lshift_double (l1, h1, -count, prec, lv, hv, arith); - return; - } - signmask = (arith ? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1)) : 0);