aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2021-08-24 10:49:11 -0600
committerMartin Sebor <msebor@redhat.com>2021-08-24 10:49:11 -0600
commit820f0940d7ace1306430a9dcf1bd9577508a7a7e (patch)
treeb9517cd7a654bf06337532a5395539c4eaa6c55e /gcc/config.gcc
parent6d692ef43b2b3368c92c3fb757c7884fc94ee627 (diff)
downloadgcc-820f0940d7ace1306430a9dcf1bd9577508a7a7e.zip
gcc-820f0940d7ace1306430a9dcf1bd9577508a7a7e.tar.gz
gcc-820f0940d7ace1306430a9dcf1bd9577508a7a7e.tar.bz2
Reset PHI base0 flag if it's clear in any argument [PR101977, ...]
Resolves: PR middle-end/101600 - Spurious -Warray-bounds downcasting a polymorphic pointer PR middle-end/101977 - bogus -Warray-bounds on a negative index into a parameter in conditional with null gcc/ChangeLog: PR middle-end/101600 PR middle-end/101977 * gimple-ssa-warn-access.cc (maybe_warn_for_bound): Tighten up the phrasing of a warning. (check_access): Use the remaining size after subtracting any offset rather than the whole object size. * pointer-query.cc (access_ref::get_ref): Clear BASE0 flag if it's clear for any nonnull PHI argument. (compute_objsize): Clear argument. gcc/testsuite/ChangeLog: PR middle-end/101600 PR middle-end/101977 * g++.dg/pr100574.C: Prune out valid warning. * gcc.dg/pr20126.c: Same. * gcc.dg/Wstringop-overread.c: Adjust text of expected warnings. Add new instances. * gcc.dg/warn-strnlen-no-nul.c: Same. * g++.dg/warn/Warray-bounds-26.C: New test. * gcc.dg/Warray-bounds-88.c: New test.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions