]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
analyzer: "__analyzer_dump_state" has no side-effects
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 12 Nov 2021 15:14:35 +0000 (10:14 -0500)
committerDavid Malcolm <dmalcolm@redhat.com>
Fri, 12 Nov 2021 19:01:36 +0000 (14:01 -0500)
gcc/analyzer/ChangeLog:
* engine.cc (exploded_node::on_stmt_pre): Return when handling
"__analyzer_dump_state".

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
gcc/analyzer/engine.cc

index f21f8e5b78a3c85215832ce0b46217f0250fff54..b29a21cce303ca1c8b2e67446f879e607dcbebf4 100644 (file)
@@ -1325,8 +1325,11 @@ exploded_node::on_stmt_pre (exploded_graph &eg,
          return;
        }
       else if (is_special_named_call_p (call, "__analyzer_dump_state", 2))
-       state->impl_call_analyzer_dump_state (call, eg.get_ext_state (),
-                                             ctxt);
+       {
+         state->impl_call_analyzer_dump_state (call, eg.get_ext_state (),
+                                               ctxt);
+         return;
+       }
       else if (is_setjmp_call_p (call))
        {
          state->m_region_model->on_setjmp (call, this, ctxt);