Commit 4d59a001 by Richard Guenther Committed by Richard Biener

gimple-fold.c (gimple_fold_stmt_to_constant_1): Set a location on the built ADDR_EXPR.

2011-08-29  Richard Guenther  <rguenther@suse.de>

	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Set a location
	on the built ADDR_EXPR.

From-SVN: r178172
parent 8abdac29
2011-08-29 Richard Guenther <rguenther@suse.de>
* gimple-fold.c (gimple_fold_stmt_to_constant_1): Set a location
on the built ADDR_EXPR.
2011-08-29 Jakub Jelinek <jakub@redhat.com> 2011-08-29 Jakub Jelinek <jakub@redhat.com>
PR debug/50215 PR debug/50215
...@@ -2987,8 +2987,9 @@ gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree)) ...@@ -2987,8 +2987,9 @@ gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree))
&& TREE_CODE (op1) == INTEGER_CST) && TREE_CODE (op1) == INTEGER_CST)
{ {
tree off = fold_convert (ptr_type_node, op1); tree off = fold_convert (ptr_type_node, op1);
return build_fold_addr_expr return build_fold_addr_expr_loc
(fold_build2 (MEM_REF, (loc,
fold_build2 (MEM_REF,
TREE_TYPE (TREE_TYPE (op0)), TREE_TYPE (TREE_TYPE (op0)),
unshare_expr (op0), off)); unshare_expr (op0), off));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment