[Bug tree-optimization/108082] False Warray-bounds warning

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Tue Dec 13 12:19:11 GMT 2022


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization
             Blocks|                            |56456
           Keywords|                            |diagnostic
   Last reconfirmed|                            |2022-12-13
             Status|UNCONFIRMED                 |WAITING
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Without a full testcase it's hard to tell but I would guess there's partial
inlining inlining the if (num < 2) num; check so the bound isn't present
when analyzing the body.  There's a duplicate bugreport for exactly this case
btw.


Referenced Bugs:

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


More information about the Gcc-bugs mailing list