aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-array-bounds.cc
AgeCommit message (Collapse)AuthorFilesLines
2020-07-27Diagnose just-past-the-end references for minor array bounds.Martin Sebor1-2/+9
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.
2020-06-01Move array bounds checking into its own file.Aldy Hernandez1-0/+700
gcc/ * Makefile.in (gimple-array-bounds.o): New. * tree-vrp.c: Move array bounds code... * gimple-array-bounds.cc: ...here... * gimple-array-bounds.h: ...and here.