surprisingly, a duplicate case can cause 5c to loop generating instructions until memory runs out. better to stop cc/pswt.c once the case is known to be wrong. it doesn't cause 8c to fail because it doesn't do the direct case the same way while(q->val != v) { nextpc(); p->as = ABCASE; patch(p, def); v++; } and the subsequent v++ for the next case doesn't expect a matching pair of q->val.