Test case for unreachableCode (#4756)