diff options
author | Richard Guenther <rguenther@suse.de> | 2008-01-02 12:35:38 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-01-02 12:35:38 +0000 |
commit | ee6ec6667c8ae64e5bef198eb6e0e35f191f4ed2 (patch) | |
tree | 229fd5eb9a30eb3318898dfa3eb311a1d050bbe8 /gcc/tree-ssa-operands.c | |
parent | 6893e828e53be18698ad20b10afa00f822dc244b (diff) | |
download | gcc-ee6ec6667c8ae64e5bef198eb6e0e35f191f4ed2.zip gcc-ee6ec6667c8ae64e5bef198eb6e0e35f191f4ed2.tar.gz gcc-ee6ec6667c8ae64e5bef198eb6e0e35f191f4ed2.tar.bz2 |
re PR tree-optimization/34093 (ICE in ssa_operand_alloc, at tree-ssa-operands.c:484)
2008-01-02 Richard Guenther <rguenther@suse.de>
PR middle-end/34093
PR middle-end/31976
* tree-ssa-operands.c (ssa_operand_alloc): Also allocate a buffer
for very large number of operands instead of ICEing.
* gcc.c-torture/compile/pr34093.c: New testcase.
From-SVN: r131257
Diffstat (limited to 'gcc/tree-ssa-operands.c')
-rw-r--r-- | gcc/tree-ssa-operands.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/tree-ssa-operands.c b/gcc/tree-ssa-operands.c index 72f4433..116877d 100644 --- a/gcc/tree-ssa-operands.c +++ b/gcc/tree-ssa-operands.c @@ -477,11 +477,10 @@ ssa_operand_alloc (unsigned size) gimple_ssa_operands (cfun)->ssa_operand_mem_size = OP_SIZE_3 * sizeof (struct voptype_d); - /* Fail if there is not enough space. If there are this many operands - required, first make sure there isn't a different problem causing this - many operands. If the decision is that this is OK, then we can - specially allocate a buffer just for this request. */ - gcc_assert (size <= gimple_ssa_operands (cfun)->ssa_operand_mem_size); + /* We can reliably trigger the case that we need arbitrary many + operands (see PR34093), so allocate a buffer just for this request. */ + if (size > gimple_ssa_operands (cfun)->ssa_operand_mem_size) + gimple_ssa_operands (cfun)->ssa_operand_mem_size = size; ptr = (struct ssa_operand_memory_d *) ggc_alloc (sizeof (struct ssa_operand_memory_d) |