* src/pic/pcode.c (LinkFlow): handle empty flows correctly,
[fw/sdcc] / src / pic / pcode.c
index e2a8452f3051280124499635dc14cff3c4ee9149..4ef15d0f31278e1cfb58ca26dc63f368e495caa6 100644 (file)
@@ -4286,6 +4286,7 @@ void LinkFlow(pBlock *pb)
                
                /* find last instruction in flow */
                pc = findPrevInstruction (PCFL(pcflow)->end);
+               if (!pc) continue;
                
                //fprintf(stderr, "LinkFlow - flow block (seq=%d) ", pcflow->seq);
                if(isPCI_SKIP(pc)) {