projects
/
libfirm
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
some belady3 fixes
[libfirm]
/
ir
/
ir
/
irnode.c
diff --git
a/ir/ir/irnode.c
b/ir/ir/irnode.c
index
c3be35a
..
05069a8
100644
(file)
--- a/
ir/ir/irnode.c
+++ b/
ir/ir/irnode.c
@@
-154,7
+154,11
@@
new_ir_node(dbg_info *db, ir_graph *irg, ir_node *block, ir_op *op, ir_mode *mod
if (arity < 0) {
res->in = NEW_ARR_F(ir_node *, 1); /* 1: space for block */
} else {
if (arity < 0) {
res->in = NEW_ARR_F(ir_node *, 1); /* 1: space for block */
} else {
- res->in = NEW_ARR_D(ir_node *, irg->obst, (arity+1));
+ /* not nice but necessary: End must always have a flexible array */
+ if (op == op_End)
+ res->in = NEW_ARR_F(ir_node *, (arity+1));
+ else
+ res->in = NEW_ARR_D(ir_node *, irg->obst, (arity+1));
memcpy(&res->in[1], in, sizeof(ir_node *) * arity);
}
memcpy(&res->in[1], in, sizeof(ir_node *) * arity);
}