diff options
author | Martin Sebor <msebor@redhat.com> | 2021-12-04 16:57:48 -0700 |
---|---|---|
committer | Martin Sebor <msebor@redhat.com> | 2021-12-09 09:51:47 -0700 |
commit | 9354a7d70caef1c94b8d0a66bb2fd4d86c037e7d (patch) | |
tree | 009f07629cb833adc2c57315f538162fafb13f0a /gcc/gimple-ssa-warn-restrict.c | |
parent | f9379fcb0d482cf4e2efd93b313523ab21fdc7da (diff) | |
download | gcc-9354a7d70caef1c94b8d0a66bb2fd4d86c037e7d.zip gcc-9354a7d70caef1c94b8d0a66bb2fd4d86c037e7d.tar.gz gcc-9354a7d70caef1c94b8d0a66bb2fd4d86c037e7d.tar.bz2 |
Pass GIMPLE statement to compute_objsize.
gcc/ChangeLog:
* gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Pass
GIMPLE statement to compute_objsize.
* pointer-query.cc (compute_objsize): Add a statement argument.
* pointer-query.h (compute_objsize): Define a new overload.
Diffstat (limited to 'gcc/gimple-ssa-warn-restrict.c')
-rw-r--r-- | gcc/gimple-ssa-warn-restrict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/gimple-ssa-warn-restrict.c b/gcc/gimple-ssa-warn-restrict.c index d1df9ca..ca2d4c2 100644 --- a/gcc/gimple-ssa-warn-restrict.c +++ b/gcc/gimple-ssa-warn-restrict.c @@ -777,7 +777,7 @@ builtin_access::builtin_access (range_query *query, gimple *call, if (!POINTER_TYPE_P (TREE_TYPE (addr))) addr = build1 (ADDR_EXPR, (TREE_TYPE (addr)), addr); - if (tree dstsize = compute_objsize (addr, ostype)) + if (tree dstsize = compute_objsize (addr, call, ostype)) dst.basesize = wi::to_offset (dstsize); else if (POINTER_TYPE_P (TREE_TYPE (addr))) dst.basesize = HOST_WIDE_INT_MIN; @@ -791,7 +791,7 @@ builtin_access::builtin_access (range_query *query, gimple *call, if (!POINTER_TYPE_P (TREE_TYPE (addr))) addr = build1 (ADDR_EXPR, (TREE_TYPE (addr)), addr); - if (tree srcsize = compute_objsize (addr, ostype)) + if (tree srcsize = compute_objsize (addr, call, ostype)) src.basesize = wi::to_offset (srcsize); else if (POINTER_TYPE_P (TREE_TYPE (addr))) src.basesize = HOST_WIDE_INT_MIN; |