[Bug analyzer/96374] Analyzer erroneously rejects certain diagnostics due to path-feasibility being used on shortest path

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Mar 11 22:45:47 GMT 2021


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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

https://gcc.gnu.org/g:5e33e5b042a6a830c40cee3d0a925bc49dcfe069

commit r11-7639-g5e33e5b042a6a830c40cee3d0a925bc49dcfe069
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Mar 11 17:45:10 2021 -0500

    analyzer: support reverse direction in shortest-paths.h

    This patch generalizes shortest-path.h so that it can be used to
    find the shortest path from each node to a given target node (on top
    of the existing support for finding the shortest path from a given
    origin node to each node).

    I've marked this as "analyzer" as this is the only code using
    shortest-paths.h.

    This patch is required by followup work to fix PR analyzer/96374.

    gcc/analyzer/ChangeLog:
            * diagnostic-manager.cc (epath_finder::epath_finder):
            Update shortest_paths init for new param.

    gcc/ChangeLog:
            * digraph.cc (selftest::test_shortest_paths): Update
            shortest_paths init for new param.  Add test of
            SPS_TO_GIVEN_TARGET.
            * shortest-paths.h (enum shortest_path_sense): New.
            (shortest_paths::shortest_paths): Add "sense" param.
            Update for renamings.  Generalize to use "sense" param.
            (shortest_paths::get_shortest_path): Rename param.
            (shortest_paths::m_sense): New field.
            (shortest_paths::m_prev): Rename...
            (shortest_paths::m_best_edge): ...to this.
            (shortest_paths::get_shortest_path): Update for renamings.
            Conditionalize flipping of path on sense of traversal.


More information about the Gcc-bugs mailing list