From: Richard Sandiford Date: Tue, 27 Sep 2011 17:18:22 +0000 (+0000) Subject: re PR libgomp/50386 (libgomp.h:87:5: error: unnamed struct/union that defines no... X-Git-Tag: upstream/12.2.0~81092 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=58ac64596ae0fecfe67e0bb27688eb3cddc67bde;p=platform%2Fupstream%2Fgcc.git re PR libgomp/50386 (libgomp.h:87:5: error: unnamed struct/union that defines no instances) gcc/ PR middle-end/50386 PR middle-end/50326 * tree-sra.c (build_ref_for_model): Use the type of the field as the type of the COMPONENT_REF. From-SVN: r179285 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index dbe8a60..5858138 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2011-09-27 Richard Sandiford + + PR middle-end/50386 + PR middle-end/50326 + * tree-sra.c (build_ref_for_model): Use the type of the field as + the type of the COMPONENT_REF. + 2011-09-27 Jeff Law * ifcvt.c (cheap_bb_rtx_cost_p): Add SCALE argument. Scale diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c index c85a7f5..39d0278 100644 --- a/gcc/tree-sra.c +++ b/gcc/tree-sra.c @@ -1504,7 +1504,7 @@ build_ref_for_model (location_t loc, tree base, HOST_WIDE_INT offset, 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