On 08/30/2013 09:13 AM, Meador Inge wrote:
Hi All,

This patch fixes a minor issue that can occur when issuing array bounds
warnings.  In GNU C mode we allow empty lists and their upper bound is
initialized to -1.  This confuses the array bound analysis in VRP and
in some cases we end up issuing false positives.  This patch fixes
the issue by bailing out when a zero-length array is encountered.

OK for trunk?

gcc/

2013-08-30  Meador Inge  <mead...@codesourcery.com>

        * tree-vrp.c (check_array_ref): Bail out no emtpy arrays.

gcc/testsuite/

2013-08-30  Meador Inge  <mead...@codesourcery.com>

        * gcc.dg/Warray-bounds-11.c: New testcase.
OK for the trunk.  Thanks,
Jeff

Reply via email to