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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=79220
             Blocks|                            |56456

--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
See pr79220 where a similar problem was already fixed.  This still doesn't work
because memcpy calls with a small power-of-2 size continue to be folded when
the out-of-bounds offset is not detected (the detection happens too early,
before the value of the non-constant offset, and especially its range, is
known).

The only way to solve this without delaying the folding is to also check
MEM_REF expressions for out-of-bounds offsets.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56456
[Bug 56456] [meta-bug] bogus/missing -Warray-bounds

Reply via email to