On Thu, Jan 26, 2012 at 10:35 AM, Tom de Vries <tom_devr...@mentor.com> wrote: > Richard, > > This patch fixes PR51990. > > The patch adds handling of WITH_SIZE_EXPR in copy_reference_ops_from_ref and > create_component_ref_by_pieces_1, preventing ICEs on the test-cases.
The create_component_ref_by_pieces_1 handling is incorrect - you fail to properly re-instantiate operand 1 (currop->op0). You should add a new case for WITH_SIZE_EXPR and properly handle it via op0expr = get_or_alloc_expr_for (currop->op0); genop0 = find_or_generate_expression (block, op0expr, stmts, domstmt); if (!genop0) return NULL_TREE; Richard. > Bootstrapped and reg-tested on x86_64. > > Ok for stage4 or stage1? > > Thanks, > - Tom > > 2012-01-26 Tom de Vries <t...@codesourcery.com> > > PR tree-optimization/51990 > * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Handle > WITH_SIZE_EXPR. > * tree-ssa-pre.c (create_component_ref_by_pieces_1): Same. > > * gcc.dg/pr51990.c: New test. > * gcc.dg/pr51990-2.c: Same.