[Bug tree-optimization/84079] missing -Warray-bounds taking the address of a multidimensional array element
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 27 20:08:15 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84079
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Martin Sebor <msebor@gcc.gnu.org>:
https://gcc.gnu.org/g:07bd5544a3ab3a04d1652dbcb5a09d7271a9706a
commit r11-2370-g07bd5544a3ab3a04d1652dbcb5a09d7271a9706a
Author: Martin Sebor <msebor@redhat.com>
Date: Mon Jul 27 13:54:50 2020 -0600
Diagnose just-past-the-end references for minor array bounds.
Resolves:
PR tree-optimization/84079 - missing -Warray-bounds taking the address of
past-the-end element of a multidimensional array
gcc/ChangeLog:
PR tree-optimization/84079
* gimple-array-bounds.cc (array_bounds_checker::check_addr_expr):
Only allow just-past-the-end references for the most significant
array bound.
gcc/testsuite/ChangeLog:
PR tree-optimization/84079
* gcc.dg/Warray-bounds-62.c: New test.
More information about the Gcc-bugs
mailing list