http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52890
--- Comment #5 from Martin Jambor <jamborm at gcc dot gnu.org> 2012-04-11 15:53:44 UTC --- But when I add the following line to the patch linked above, the problem goes away: Index: src/gcc/tree-sra.c =================================================================== --- src.orig/gcc/tree-sra.c +++ src/gcc/tree-sra.c @@ -1455,6 +1455,7 @@ build_ref_for_offset (location_t loc, tr } else if (TREE_CODE (base) == MEM_REF) { + prev_base = base; off = build_int_cst (TREE_TYPE (TREE_OPERAND (base, 1)), base_offset + offset / BITS_PER_UNIT); off = int_const_binop (PLUS_EXPR, TREE_OPERAND (base, 1), off);