[Bug fortran/95512] gcc/fortran/trans-decl.c:1066: array sanity check after use

dcb314 at hotmail dot com gcc-bugzilla@gcc.gnu.org
Sat Jun 6 06:26:53 GMT 2020


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

--- Comment #2 from David Binderman <dcb314 at hotmail dot com> ---
I fail to understand how this can be a false positive.

 if (array[ X] && X < something - 1)

looks like a pretty convincing case of use before sanity checking to me.
It is a standard pattern to sanity check array indexes before use.

The previous if doesn't sanity check the array index, so there is
no chance of getting the sanity check in a non standard place.


More information about the Gcc-bugs mailing list