diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-24 12:44:58 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-03-24 12:44:58 +0000 |
commit | 1688dd20f8f0355b3748d31e11274c5239d7a853 (patch) | |
tree | faced84a3cdaada552e2cec1d6c500866d64c6b6 /gcc/tree-object-size.c | |
parent | 284cc4806917b7677ea5e0780a3dbaddadff325a (diff) | |
download | gcc-1688dd20f8f0355b3748d31e11274c5239d7a853.tar.gz |
2011-03-24 Richard Guenther <rguenther@suse.de>
PR middle-end/48269
* tree-object-size.c (addr_object_size): Do not double-account
for MEM_REF offsets.
* gcc.dg/builtin-object-size-10.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171388 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-object-size.c')
-rw-r--r-- | gcc/tree-object-size.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c index 6a74d19edc0..043b445bf2e 100644 --- a/gcc/tree-object-size.c +++ b/gcc/tree-object-size.c @@ -348,8 +348,6 @@ addr_object_size (struct object_size_info *osi, const_tree ptr, tree bytes2 = compute_object_offset (TREE_OPERAND (ptr, 0), pt_var); if (bytes2 != error_mark_node) { - bytes2 = size_binop (PLUS_EXPR, bytes2, - TREE_OPERAND (pt_var, 1)); if (TREE_CODE (bytes2) == INTEGER_CST && tree_int_cst_lt (pt_var_size, bytes2)) bytes2 = size_zero_node; |