From 3b16e4fae1b001062b74a25c354cbd2b56cafde5 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Mon, 20 Apr 2020 16:02:56 -0400 Subject: [PATCH 058/179] FIXME: bare-bones impl of GIMPLE_CALL --- gcc/analyzer/region-model2.cc | 17 ++++++++++++++--- gcc/analyzer/region-model2.h | 5 +++++ 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/gcc/analyzer/region-model2.cc b/gcc/analyzer/region-model2.cc index 9f681ca1e6b..cc506c08f75 100644 --- a/gcc/analyzer/region-model2.cc +++ b/gcc/analyzer/region-model2.cc @@ -3544,11 +3544,11 @@ bool region_model2::on_stmt (const supernode *snode, const gimple *stmt) { -#if 0 -#endif - switch (stmt->code) { + case GIMPLE_CALL: + return on_gcall (snode, as_a (stmt)); + case GIMPLE_COND: /* This is a no-op; the condition is handled by the true/false superedges. */ @@ -3781,6 +3781,17 @@ region_model2::on_gassign (const supernode */*snode*/, return true; } +/* FIXME. */ + +bool +region_model2::on_gcall (const supernode *snode, + const gcall *call) +{ + // TODO + //gcc_unreachable (); + return true; +} + /* Update this model for the CALL stmt, using CTXT to report any diagnostics - the first half. diff --git a/gcc/analyzer/region-model2.h b/gcc/analyzer/region-model2.h index 4f945f5cd78..f6114b4bd4e 100644 --- a/gcc/analyzer/region-model2.h +++ b/gcc/analyzer/region-model2.h @@ -1593,12 +1593,17 @@ class region_model2 const gimple *stmt); bool on_gassign (const supernode *snode, const gassign *stmt); +#if 1 + bool on_gcall (const supernode *snode, + const gcall *stmt); +#else bool on_call_pre (const gcall *stmt, region_model2_context *ctxt); void on_call_post (const gcall *stmt, bool unknown_side_effects, region_model2_context *ctxt); void handle_unrecognized_call (const gcall *call, region_model2_context *ctxt); +#endif bool on_greturn (const supernode *snode, const greturn *stmt); void on_setjmp (const gcall *stmt, const exploded_node *enode, -- 2.21.0