projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9883982
)
fix backend/lower_call3.c
author
Andreas Zwinkau
<zwinkau@kit.edu>
Wed, 20 Apr 2011 12:49:30 +0000
(14:49 +0200)
committer
Andreas Zwinkau
<zwinkau@kit.edu>
Wed, 20 Apr 2011 12:49:30 +0000
(14:49 +0200)
ir/lower/lower_calls.c
patch
|
blob
|
history
diff --git
a/ir/lower/lower_calls.c
b/ir/lower/lower_calls.c
index
14916bd
..
5036694
100644
(file)
--- a/
ir/lower/lower_calls.c
+++ b/
ir/lower/lower_calls.c
@@
-666,11
+666,6
@@
static void transform_irg(const lower_params_t *lp, ir_graph *irg)
if (n_ret_com) {
int idx;
if (n_ret_com) {
int idx;
- /*
- * Now fix the Return node of the current graph.
- */
- env.changed = 1;
-
/* STEP 1: find the return. This is simple, we have normalized the graph. */
endbl = get_irg_end_block(irg);
ret = NULL;
/* STEP 1: find the return. This is simple, we have normalized the graph. */
endbl = get_irg_end_block(irg);
ret = NULL;
@@
-682,8
+677,14
@@
static void transform_irg(const lower_params_t *lp, ir_graph *irg)
break;
}
}
break;
}
}
- /* there should always be a return */
- assert(ret);
+
+ /* in case of infinite loops, there might be no return */
+ if (ret == NULL) goto return_fixed;
+
+ /*
+ * Now fix the Return node of the current graph.
+ */
+ env.changed = 1;
/*
* STEP 2: fix it. For all compound return values add a CopyB,
/*
* STEP 2: fix it. For all compound return values add a CopyB,
@@
-756,6
+757,7
@@
static void transform_irg(const lower_params_t *lp, ir_graph *irg)
}
}
} /* if (n_ret_com) */
}
}
} /* if (n_ret_com) */
+return_fixed:
pmap_destroy(env.dummy_map);
obstack_free(&env.obst, NULL);
pmap_destroy(env.dummy_map);
obstack_free(&env.obst, NULL);