]> gcc.gnu.org Git - gcc.git/commit
PR middle-end/98266 - bogus array subscript is partly outside array bounds on virtual...
authorMartin Sebor <msebor@redhat.com>
Mon, 8 Mar 2021 20:37:21 +0000 (13:37 -0700)
committerMartin Sebor <msebor@redhat.com>
Mon, 8 Mar 2021 20:37:21 +0000 (13:37 -0700)
commitf3daa6c0fd8d79ae45eac2dd0f274da1aa71c958
treeb3ab03035bc62990c57b38a1dccf441011dd1209
parent7f5ff78ff3f971c11ec67f422b2fd34281db9123
PR middle-end/98266 - bogus array subscript is partly outside array bounds on virtual inheritance

gcc/ChangeLog:

PR middle-end/98266
* gimple-array-bounds.cc (inbounds_vbase_memaccess_p): New function.
(array_bounds_checker::check_array_bounds): Call it.

gcc/testsuite/ChangeLog:

PR middle-end/98266
* g++.dg/warn/Warray-bounds-15.C: New test.
* g++.dg/warn/Warray-bounds-18.C: New test.
* g++.dg/warn/Warray-bounds-19.C: New test.
* g++.dg/warn/Warray-bounds-20.C: New test.
* g++.dg/warn/Warray-bounds-21.C: New test.
gcc/gimple-array-bounds.cc
gcc/testsuite/g++.dg/warn/Warray-bounds-15.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Warray-bounds-18.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Warray-bounds-19.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Warray-bounds-20.C [new file with mode: 0644]
gcc/testsuite/g++.dg/warn/Warray-bounds-21.C [new file with mode: 0644]
This page took 0.064267 seconds and 6 git commands to generate.