summaryrefslogtreecommitdiff
path: root/gcc/tree-object-size.c
diff options
context:
space:
mode:
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2016-12-13 09:17:42 +0000
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>2016-12-13 09:17:42 +0000
commit17dba507b6fd48f389b022fa8bcef6cd7698423c (patch)
treec4391d1481feb6460765c0bf0934473b01c2383e /gcc/tree-object-size.c
parenta30589d5dfe4c22ad7753a983046d71450cf6d6b (diff)
2016-12-13 Richard Biener <rguenther@suse.de>
PR middle-end/78742 * tree.c (cst_and_fits_in_hwi): Look if the actual value fits. * tree-object-size.c (compute_builtin_object_size): Use tree_fits_shwi_p. * tree-data-ref.c (initialize_matrix_A): Remove excess assert. * gcc.dg/torture/pr78742.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243598 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-object-size.c')
-rw-r--r--gcc/tree-object-size.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-object-size.c b/gcc/tree-object-size.c
index 0fae183b330a..f9c752198e0f 100644
--- a/gcc/tree-object-size.c
+++ b/gcc/tree-object-size.c
@@ -538,7 +538,7 @@ compute_builtin_object_size (tree ptr, int object_size_type,
tree offset = gimple_assign_rhs2 (def);
ptr = gimple_assign_rhs1 (def);
- if (cst_and_fits_in_hwi (offset)
+ if (tree_fits_shwi_p (offset)
&& compute_builtin_object_size (ptr, object_size_type, psize))
{
/* Return zero when the offset is out of bounds. */