Set the outs to inconsistent at the end of transform_irg().
[libfirm] / ir / ir / irvrfy.c
index 818f55c..6042e31 100644 (file)
@@ -1565,7 +1565,7 @@ static int verify_node_Phi(ir_node *n, ir_graph *irg) {
        int i;
        (void) irg;
 
-       if (! is_Bad(block) && get_irg_phase_state(get_irn_irg(n)) != phase_building) {
+       if (! is_Bad(block) && get_irg_phase_state(get_irn_irg(n)) != phase_building && get_irn_arity(n) > 0) {
                /* a Phi node MUST have the same number of inputs as its block */
                ASSERT_AND_RET_DBG(
                        get_irn_arity(n) == get_irn_arity(block),
@@ -1948,11 +1948,12 @@ int irn_vrfy_irg(ir_node *n, ir_graph *irg) {
 }
 
 int irn_vrfy(ir_node *n) {
-       int res = 1;
 #ifdef DEBUG_libfirm
-       res = irn_vrfy_irg(n, current_ir_graph);
+       return irn_vrfy_irg(n, current_ir_graph);
+#else
+       (void)n;
+       return 1;
 #endif
-       return res;
 }
 
 /*-----------------------------------------------------------------*/
@@ -2019,6 +2020,9 @@ int irg_verify(ir_graph *irg, unsigned flags) {
                else
                        fprintf(stderr, "irg_verify: Verifying graph %p failed\n", (void *)current_ir_graph);
        }
+#else
+       (void)irg;
+       (void)flags;
 #endif /* DEBUG_libfirm */
 
        return res;