Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/ChangeLog:
* gimple-array-bounds.cc (build_zero_elt_array_type): New function.
(array_bounds_checker::check_mem_ref): Call it.
|
|
gcc/ChangeLog:
PR middle-end/82608
PR middle-end/94195
PR c/50584
PR middle-end/84051
* gimple-array-bounds.cc (get_base_decl): New function.
(get_ref_size): New function.
(trailing_array): New function.
(array_bounds_checker::check_array_ref): Call them. Handle arrays
declared in function parameters.
(array_bounds_checker::check_mem_ref): Same. Handle references to
dynamically allocated arrays.
gcc/testsuite/ChangeLog:
PR middle-end/82608
PR middle-end/94195
PR c/50584
PR middle-end/84051
* c-c++-common/Warray-bounds.c: Adjust.
* gcc.dg/Wbuiltin-declaration-mismatch-9.c: Adjust.
* gcc.dg/Warray-bounds-63.c: New test.
* gcc.dg/Warray-bounds-64.c: New test.
* gcc.dg/Warray-bounds-65.c: New test.
* gcc.dg/Warray-bounds-66.c: New test.
* gcc.dg/Warray-bounds-67.c: New test.
|
|
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.
|
|
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.
|