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

--- 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:897b3b31f0a94b8bac59c6061655c6a32646d0a0

commit r13-1562-g897b3b31f0a94b8bac59c6061655c6a32646d0a0
Author: David Malcolm <dmalc...@redhat.com>
Date:   Thu Jul 7 15:50:26 2022 -0400

    analyzer: fix false positives from -Wanalyzer-tainted-divisor [PR106225]

    gcc/analyzer/ChangeLog:
            PR analyzer/106225
            * sm-taint.cc (taint_state_machine::on_stmt): Move handling of
            assignments from division to...
            (taint_state_machine::check_for_tainted_divisor): ...this new
            function.  Reject warning when the divisor is known to be non-zero.
            * sm.cc: Include "analyzer/program-state.h".
            (sm_context::get_old_region_model): New.
            * sm.h (sm_context::get_old_region_model): New decl.

    gcc/testsuite/ChangeLog:
            PR analyzer/106225
            * gcc.dg/analyzer/taint-divisor-1.c: Add test coverage for various
            correct and incorrect checks against zero.

    Signed-off-by: David Malcolm <dmalc...@redhat.com>

Reply via email to