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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>:

https://gcc.gnu.org/g:e7c482b08076bb299742883c4ffd65b31e33200c

commit r13-796-ge7c482b08076bb299742883c4ffd65b31e33200c
Author: Richard Biener <rguent...@suse.de>
Date:   Wed May 25 11:49:03 2022 +0200

    tree-optimization/105726 - adjust array bound heuristic

    There's heuristic to detect ptr[1].a[...] out of bound accesses
    reasoning that if ptr points to an array of aggregates a trailing
    incomplete array has to have size zero.  The following more
    thoroughly constrains the cases this applies to avoid false
    positive diagnostics.

    2022-05-25  Richard Biener  <rguent...@suse.de>

            PR tree-optimization/105726
            * gimple-ssa-warn-restrict.cc
(builtin_memref::set_base_and_offset):
            Constrain array-of-flexarray case more.

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

Reply via email to