diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-20 05:35:17 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-07-20 05:35:17 +0000 |
commit | 6b351cc8c497c4ed9d296b55b424341f20b56f92 (patch) | |
tree | 8bcbc6cc30a2f9d6253007a662393cfed258713a /gcc/gimple.c | |
parent | d0df232358778b869142e628e5e736fc7515f5ab (diff) | |
download | gcc-6b351cc8c497c4ed9d296b55b424341f20b56f92.tar.gz |
2009-07-20 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 149800
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@149801 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple.c')
-rw-r--r-- | gcc/gimple.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/gcc/gimple.c b/gcc/gimple.c index 56108312431..aa30a2e31c0 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -487,6 +487,7 @@ void gimple_cond_get_ops_from_tree (tree cond, enum tree_code *code_p, tree *lhs_p, tree *rhs_p) { + location_t loc = EXPR_LOCATION (cond); gcc_assert (TREE_CODE_CLASS (TREE_CODE (cond)) == tcc_comparison || TREE_CODE (cond) == TRUTH_NOT_EXPR || is_gimple_min_invariant (cond) @@ -499,14 +500,14 @@ gimple_cond_get_ops_from_tree (tree cond, enum tree_code *code_p, { *code_p = EQ_EXPR; gcc_assert (*lhs_p && *rhs_p == NULL_TREE); - *rhs_p = fold_convert (TREE_TYPE (*lhs_p), integer_zero_node); + *rhs_p = fold_convert_loc (loc, TREE_TYPE (*lhs_p), integer_zero_node); } /* Canonicalize conditionals of the form 'if (VAL)' */ else if (TREE_CODE_CLASS (*code_p) != tcc_comparison) { *code_p = NE_EXPR; gcc_assert (*lhs_p && *rhs_p == NULL_TREE); - *rhs_p = fold_convert (TREE_TYPE (*lhs_p), integer_zero_node); + *rhs_p = fold_convert_loc (loc, TREE_TYPE (*lhs_p), integer_zero_node); } } @@ -1897,10 +1898,11 @@ gimple_set_bb (gimple stmt, basic_block bb) tree gimple_fold (const_gimple stmt) { + location_t loc = gimple_location (stmt); switch (gimple_code (stmt)) { case GIMPLE_COND: - return fold_binary (gimple_cond_code (stmt), + return fold_binary_loc (loc, gimple_cond_code (stmt), boolean_type_node, gimple_cond_lhs (stmt), gimple_cond_rhs (stmt)); @@ -1909,11 +1911,11 @@ gimple_fold (const_gimple stmt) switch (get_gimple_rhs_class (gimple_assign_rhs_code (stmt))) { case GIMPLE_UNARY_RHS: - return fold_unary (gimple_assign_rhs_code (stmt), + return fold_unary_loc (loc, gimple_assign_rhs_code (stmt), TREE_TYPE (gimple_assign_lhs (stmt)), gimple_assign_rhs1 (stmt)); case GIMPLE_BINARY_RHS: - return fold_binary (gimple_assign_rhs_code (stmt), + return fold_binary_loc (loc, gimple_assign_rhs_code (stmt), TREE_TYPE (gimple_assign_lhs (stmt)), gimple_assign_rhs1 (stmt), gimple_assign_rhs2 (stmt)); |