used ircons_t.h now
[libfirm] / ir / ir / irgopt.c
index 6c9dcc7..7798f0f 100644 (file)
@@ -24,7 +24,7 @@
 # include "irgraph_t.h"
 # include "iropt_t.h"
 # include "irgwalk.h"
-# include "ircons.h"
+# include "ircons_t.h"
 # include "irgmod.h"
 # include "array.h"
 # include "pset.h"
@@ -887,7 +887,10 @@ int inline_method(ir_node *call, ir_graph *called_graph) {
           n_ret++;
         }
       }
-      phi = new_Phi(n_ret, cf_pred, get_irn_mode(cf_pred[0]));
+      if (n_ret > 0)
+       phi = new_Phi(n_ret, cf_pred, get_irn_mode(cf_pred[0]));
+      else
+       phi = new_Bad();
       res_pred[j] = phi;
       /* Conserve Phi-list for further inlinings -- but might be optimized */
       if (get_nodes_Block(phi) == post_bl) {