diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 09:03:41 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-08-29 09:03:41 +0000 |
commit | 3048a5c0bc47f77c8b3565a172b34e921e9ae87f (patch) | |
tree | 225ef726671cd1648337b7bb547b57f7e4ab2a74 /gcc/gimple-fold.c | |
parent | aee4fe4aaa5b552cecd8563a8bb11fc4e88f1c3a (diff) | |
download | gcc-3048a5c0bc47f77c8b3565a172b34e921e9ae87f.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178172 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimple-fold.c')
-rw-r--r-- | gcc/gimple-fold.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/gimple-fold.c b/gcc/gimple-fold.c index 12b2d4e4a4b..19f34000654 100644 --- a/gcc/gimple-fold.c +++ b/gcc/gimple-fold.c @@ -2987,8 +2987,9 @@ gimple_fold_stmt_to_constant_1 (gimple stmt, tree (*valueize) (tree)) && TREE_CODE (op1) == INTEGER_CST) { tree off = fold_convert (ptr_type_node, op1); - return build_fold_addr_expr - (fold_build2 (MEM_REF, + return build_fold_addr_expr_loc + (loc, + fold_build2 (MEM_REF, TREE_TYPE (TREE_TYPE (op0)), unshare_expr (op0), off)); } |