[Bug tree-optimization/66974] -Warray-bounds false positive with -O3

dj at redhat dot com gcc-bugzilla@gcc.gnu.org
Thu Jul 23 03:06:00 GMT 2015


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

DJ Delorie <dj at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dj at redhat dot com

--- Comment #1 from DJ Delorie <dj at redhat dot com> ---
If elsewhere calls foo(500) you will get an actual out of bounds access.  I
think the warning is appropriate.  Have you tried checking the value of 'order'
in that function, before the loop, to validate its value?  Such a check might
fix your bug and silence the warning.



More information about the Gcc-bugs mailing list