From patchwork Fri Nov 12 19:03:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 47564 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B4F66385801F for ; Fri, 12 Nov 2021 19:04:04 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4F66385801F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1636743844; bh=KIK8ZOFlze70kjpbj2vqHc+yNxZqbgyY/tpJagNL/Xg=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=AtFEIcH66tl2y6VvfW/G1rDBGmy16Woc3viBGulp3Dg4zrN9GXbfefP80bOA+9W0k G/jioyzJc1rUuvU5J3CKgxj8AC6kOFIb/7iqHx2EvwE+RRrHl9sPbpxu7gKEskKgEv wdy0Eyn9igm4N/zyfhGA/QL46TfsI2Buz4+UkhYU= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTPS id 2F4363858413 for ; Fri, 12 Nov 2021 19:03:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2F4363858413 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-501-THkfoXjNO7iExgDtTTJQMw-1; Fri, 12 Nov 2021 14:03:09 -0500 X-MC-Unique: THkfoXjNO7iExgDtTTJQMw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 79B7884F20A for ; Fri, 12 Nov 2021 19:03:08 +0000 (UTC) Received: from t14s.localdomain.com (ovpn-113-54.phx2.redhat.com [10.3.113.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 21FAD60C05; Fri, 12 Nov 2021 19:03:07 +0000 (UTC) To: gcc-patches@gcc.gnu.org Subject: [committed] analyzer: "__analyzer_dump_state" has no side-effects Date: Fri, 12 Nov 2021 14:03:04 -0500 Message-Id: <20211112190304.1993691-1-dmalcolm@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: David Malcolm via Gcc-patches From: David Malcolm Reply-To: David Malcolm Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to trunk as 72f1c1c452198ba1df6f70959180b201cedc506e. gcc/analyzer/ChangeLog: * engine.cc (exploded_node::on_stmt_pre): Return when handling "__analyzer_dump_state". Signed-off-by: David Malcolm --- gcc/analyzer/engine.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gcc/analyzer/engine.cc b/gcc/analyzer/engine.cc index f21f8e5b78a..b29a21cce30 100644 --- a/gcc/analyzer/engine.cc +++ b/gcc/analyzer/engine.cc @@ -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);