Index: gcc/tree-sra.c
===================================================================
--- gcc/tree-sra.c	2011-09-12 09:09:34.000000000 +0100
+++ gcc/tree-sra.c	2011-09-27 14:09:45.379960167 +0100
@@ -1504,7 +1504,7 @@ build_ref_for_model (location_t loc, tre
       offset -= TREE_INT_CST_LOW (DECL_FIELD_BIT_OFFSET (fld));
       exp_type = TREE_TYPE (TREE_OPERAND (model->expr, 0));
       t = build_ref_for_offset (loc, base, offset, exp_type, gsi, insert_after);
-      return fold_build3_loc (loc, COMPONENT_REF, model->type, t, fld,
+      return fold_build3_loc (loc, COMPONENT_REF, TREE_TYPE (fld), t, fld,
 			      TREE_OPERAND (model->expr, 2));
     }
   else
