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 middle-end/35593] [4.3 Regression] spurious warning "array subscript is below array bounds" with void* function argument plus -O2



------- Comment #5 from rguenth at gcc dot gnu dot org  2008-03-18 17:24 -------
Subject: Bug 35593

Author: rguenth
Date: Tue Mar 18 17:23:35 2008
New Revision: 133318

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133318
Log:
2008-03-18  Richard Guenther  <rguenther@suse.de>

        Backport from mainline:
        2008-03-15  Richard Guenther  <rguenther@suse.de>

        PR middle-end/35593
        * tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Make sure
        to not produce negative array indices if not allowed.  Add
        parameter to indicate that.
        (maybe_fold_offset_to_component_ref): Allow negative array
        indices only for the first member of a structure.
        (maybe_fold_offset_to_reference): Allow negative array indices.
        (maybe_fold_stmt_addition): Likewise.

        * g++.dg/warn/Warray-bounds-3.C: New testcase.

Added:
    branches/gcc-4_3-branch/gcc/testsuite/g++.dg/warn/Warray-bounds-3.C
      - copied unchanged from r133249,
trunk/gcc/testsuite/g++.dg/warn/Warray-bounds-3.C
Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_3-branch/gcc/tree-ssa-ccp.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35593


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