Commit 8c82c6f5 authored by Jonas Fietz's avatar Jonas Fietz
Browse files

fix an offset bug in allocating memory for irg phases

[r27240]
parent 7c63b4d0
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment