Avoid endless recursion while walking to a projX in a loop
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 24 May 2006 16:15:59 +0000 (16:15 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 24 May 2006 16:15:59 +0000 (16:15 +0000)
[r7799]

ir/opt/ifconv.c

index b7aa9c6..ff4764f 100644 (file)
@@ -83,6 +83,11 @@ static ir_node* walk_to_projx(ir_node* start, const ir_node* dependency)
                        return pred;
                }
 
+               if (is_Proj(pred)) {
+                       assert(get_irn_mode(pred) == mode_X);
+                       return NULL;
+               }
+
                if (is_cdep_on(pred_block, dependency)) {
                        return walk_to_projx(pred_block, dependency);
                }