cleaned up the mess I left behind
[fw/sdcc] / src / SDCCcflow.c
index aff9a856b1ac0778bdcd49cefd3269a1b7638aee..95bce8b09e3d6e42a3cbedfd8deb57cf127e14bf 100644 (file)
@@ -131,6 +131,17 @@ eBBSuccessors (eBBlock ** ebbs, int count)
 
                  addSuccessor (ebbs[i], ebbs[j]);      /* add it */
                }
+             else
+               {
+                 int j=i;
+                 while (j--) {
+                   if (ebbs[j]->ech && ebbs[j]->ech->op==IFX &&
+                       (isSymbolEqual(IC_TRUE(ebbs[j]->ech), ebbs[i]->entryLabel) ||
+                        isSymbolEqual(IC_FALSE(ebbs[j]->ech), ebbs[i]->entryLabel))) {
+                     ebbs[i]->hasConditionalExit=1;
+                   }
+                 }
+               }
            }                   /* no instructions in the block */
          /* could happen for dummy blocks */
          else