diff options
author | Richard Biener <rguenther@suse.de> | 2023-03-29 13:49:24 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2023-03-30 13:15:52 +0200 |
commit | 04b0a7b1a6d9e0f3782888f1ebf187c26690038b (patch) | |
tree | e175add0da49b97bf51dd7c8d743cc652e99ed95 /gcc/range-op-float.cc | |
parent | 1d0ba4467dd9cad11eb9ff547442e3ce6292b892 (diff) | |
download | gcc-04b0a7b1a6d9e0f3782888f1ebf187c26690038b.zip gcc-04b0a7b1a6d9e0f3782888f1ebf187c26690038b.tar.gz gcc-04b0a7b1a6d9e0f3782888f1ebf187c26690038b.tar.bz2 |
tree-optimization/107561 - reduce -Wstringop-overflow false positives
The following tells pointer-query to prefer a zero size when we
are querying for the size range for a write into an object we've
determined is of zero size. That avoids diagnostics about really
varying size arguments that just get a meaningful range for example
because they are multiplied by an element size.
I've adjusted only one call to get_size_range since that's what
I have a testcase for.
PR tree-optimization/107561
* gimple-ssa-warn-access.cc (get_size_range): Add flags
argument and pass it on.
(check_access): When querying for the size range pass
SR_ALLOW_ZERO when the known destination size is zero.
* g++.dg/pr71488.C: Remove XFAILed bogus diagnostic again.
* g++.dg/warn/Warray-bounds-16.C: Likewise.
Diffstat (limited to 'gcc/range-op-float.cc')
0 files changed, 0 insertions, 0 deletions