Correct SHIFT bug#2067

Replace undefined arithmetic
Detect overflow of arithmetic shift
Tested in Linux (0.4.4) with 48 progressions and no regression.