aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2021-07-21 17:24:08 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2021-07-21 17:24:08 -0400
commite0a7a6752dad7848eb4b29b826a551c0992256ec (patch)
tree81a2f099b94604fbc59132682e0e095a89d8b96f /gcc/fortran/openmp.c
parent6bbad96cd44774bc199b256dbf4260b25b87c7db (diff)
downloadgcc-e0a7a6752dad7848eb4b29b826a551c0992256ec.zip
gcc-e0a7a6752dad7848eb4b29b826a551c0992256ec.tar.gz
gcc-e0a7a6752dad7848eb4b29b826a551c0992256ec.tar.bz2
analyzer: fix issues with phi handling
The analyzer's state purging code was overzealously purging state for ssa names that might be used within phi nodes, leading to false positives from -Wanalyzer-use-of-uninitialized-value. This patch updates phi handling in the analyzer to fix these issues. gcc/analyzer/ChangeLog: * region-model.cc (region_model::handle_phi): Add "old_state" param and use it. (region_model::update_for_phis): Update so that all of the phi stmts are effectively handled simultaneously, rather than in order. * region-model.h (region_model::handle_phi): Add "old_state" param. * state-purge.cc (self_referential_phi_p): Replace with... (name_used_by_phis_p): ...this new function. (state_purge_per_ssa_name::process_point): Update to use the above, so that all phi stmts at a basic block are effectively considered simultaneously, and only consider the phi arguments for the pertinent in-edge. * supergraph.cc (cfg_superedge::get_phi_arg_idx): New. (cfg_superedge::get_phi_arg): Use the above. * supergraph.h (cfg_superedge::get_phi_arg_idx): New decl. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/explode-2.c: Remove xfail. * gcc.dg/analyzer/explode-2a.c: Remove expected leak warning on while stmt. * gcc.dg/analyzer/phi-2.c: New test. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
Diffstat (limited to 'gcc/fortran/openmp.c')
0 files changed, 0 insertions, 0 deletions