This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/59124] [4.9/5/6 Regression] Wrong warnings "array subscript is above array bounds"


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59124

--- Comment #38 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Author: ppalka
Date: Wed Mar 30 00:55:00 2016
New Revision: 234544

URL: https://gcc.gnu.org/viewcvs?rev=234544&root=gcc&view=rev
Log:
PR tree-optimization/59124 (bogus -Warray-bounds warning)

gcc/ChangeLog:

        PR tree-optimization/59124
        * tree-vrp.c (register_edge_assert_for_2): For NAME != CST1
        where NAME = A +- CST2 add the assertion A != (CST1 -+ CST2).

gcc/testsuite/ChangeLog:

        PR tree-optimization/59124
        * gcc.dg/Warray-bounds-19.c: New test.


Added:
    trunk/gcc/testsuite/gcc.dg/Warray-bounds-19.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vrp.c

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]