I've managed to replicate this on a Windows PC: GNU Emacs 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570

Run emacs -Q

Evaluate:

    (show-paren-mode +1)

Open a new shell script buffer:

    C-x b test <RET> M-x shell-script-mode

and type:

    if<left arrow>

If I don't turn on show-paren-mode there is no hang and Emacs carries on happily.
-- 
Alan Third