https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106373
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalc...@gcc.gnu.org>: https://gcc.gnu.org/g:5e830693dd335621940368b6d39b23afc2c98545 commit r13-1768-g5e830693dd335621940368b6d39b23afc2c98545 Author: David Malcolm <dmalc...@redhat.com> Date: Wed Jul 20 17:25:35 2022 -0400 analyzer: update "tainted" state of RHS in comparisons [PR106373] Doing so fixes various false positives from -Wanalyzer-tainted-array-index at -O1 and above (e.g. seen on the Linux kernel) gcc/analyzer/ChangeLog: PR analyzer/106373 * sm-taint.cc (taint_state_machine::on_condition): Potentially update the state of the RHS as well as the LHS. gcc/testsuite/ChangeLog: PR analyzer/106373 * gcc.dg/analyzer/torture/taint-read-index-3.c: New test. Signed-off-by: David Malcolm <dmalc...@redhat.com>