projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7c63b4d
)
fix an offset bug in allocating memory for irg phases
author
Jonas Fietz
<fietz@ipd.info.uni-karlsruhe.de>
Sat, 27 Feb 2010 01:32:36 +0000
(
01:32
+0000)
committer
Jonas Fietz
<fietz@ipd.info.uni-karlsruhe.de>
Sat, 27 Feb 2010 01:32:36 +0000
(
01:32
+0000)
[r27240]
ir/ir/irphase_t.h
patch
|
blob
|
history
diff --git
a/ir/ir/irphase_t.h
b/ir/ir/irphase_t.h
index
9bffdab
..
232af1e
100644
(file)
--- a/
ir/ir/irphase_t.h
+++ b/
ir/ir/irphase_t.h
@@
-297,7
+297,7
@@
static inline void _private_phase_enlarge(ir_phase *phase, unsigned max_idx)
/* make the maximum index at least as big as the largest index in the graph. */
max_idx = MAX(max_idx, last_irg_idx);
- new_cap = (size_t) (max_idx * phase->growth_factor / 256);
+ new_cap =
old_cap +
(size_t) (max_idx * phase->growth_factor / 256);
phase->data_ptr = XREALLOC(phase->data_ptr, void*, new_cap);