PR middle-end/92341 - missing -Warray-bounds indexing past the end of a compound literal
PR middle-end/92341 - missing -Warray-bounds indexing past the end of a compound literal
PR middle-end/82612 - missing -Warray-bounds on a non-zero offset from the address of a non-array object
gcc/testsuite/ChangeLog:
PR middle-end/92341
PR middle-end/82612
* g++.dg/warn/Warray-bounds-4.C: Adjust text of expected warning.
* gcc.dg/Warray-bounds-53.c: New test.
* gcc.dg/Warray-bounds-54.c: New test.
gcc/ChangeLog:
PR middle-end/92341
PR middle-end/82612
* tree-sra.c (get_access_for_expr): Fail for out-of-bounds offsets.
* tree-vrp.c (vrp_prop::check_array_ref): Correct index and text
of message printed in a warning for empty arrays.
(vrp_prop::check_mem_ref): Also handle function parameters and
empty arrays.
From-SVN: r277851