From: ebotcazou Date: Fri, 22 Oct 2010 23:39:16 +0000 (+0000) Subject: * gimplify.c (gimplify_variable_sized_compare): Preserve the source X-Git-Tag: upstream/4.9.2~25493 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ae7e0e563f4a3df13a53cb94da1ad785b37cb53b;p=platform%2Fupstream%2Flinaro-gcc.git * gimplify.c (gimplify_variable_sized_compare): Preserve the source location info of the expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165875 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 52856cf..42e4c07 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2010-10-22 Eric Botcazou + + * gimplify.c (gimplify_variable_sized_compare): Preserve the source + location info of the expression. + 2010-10-22 DJ Delorie * doc/extend.texi (Named Address Spaces): Document the M32C named @@ -31,7 +36,7 @@ (movsi_splittable): Split A1A0 also. 2010-10-22 Artjoms Sinkarovs - Andrew Pinski + Andrew Pinski * c-typeck.c (build_array_ref): Handle subscripting of vectors. * doc/extend.texi: New paragraph diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 4753c4b..542c223 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4634,10 +4634,10 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, static enum gimplify_status gimplify_variable_sized_compare (tree *expr_p) { + location_t loc = EXPR_LOCATION (*expr_p); tree op0 = TREE_OPERAND (*expr_p, 0); tree op1 = TREE_OPERAND (*expr_p, 1); - tree t, arg, dest, src; - location_t loc = EXPR_LOCATION (*expr_p); + tree t, arg, dest, src, expr; arg = TYPE_SIZE_UNIT (TREE_TYPE (op0)); arg = unshare_expr (arg); @@ -4646,8 +4646,11 @@ gimplify_variable_sized_compare (tree *expr_p) dest = build_fold_addr_expr_loc (loc, op0); t = implicit_built_in_decls[BUILT_IN_MEMCMP]; t = build_call_expr_loc (loc, t, 3, dest, src, arg); - *expr_p + + expr = build2 (TREE_CODE (*expr_p), TREE_TYPE (*expr_p), t, integer_zero_node); + SET_EXPR_LOCATION (expr, loc); + *expr_p = expr; return GS_OK; }