public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Filip Kastl <pheeck@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc(refs/users/pheeck/heads/sccp)] analyzer: fix nondeterminism in logs
Date: Wed, 15 Feb 2023 10:22:48 +0000 (GMT)	[thread overview]
Message-ID: <20230215102248.8FB1C385842B@sourceware.org> (raw)

https://gcc.gnu.org/g:4992b1ef55bce51435c6badc9583169a20cdf49f

commit 4992b1ef55bce51435c6badc9583169a20cdf49f
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Wed Nov 23 20:43:32 2022 -0500

    analyzer: fix nondeterminism in logs
    
    gcc/analyzer/ChangeLog:
            * checker-path.cc (checker_path::inject_any_inlined_call_events):
            Don't dump the address of the block when -fdump-noaddr.
    
    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

Diff:
---
 gcc/analyzer/checker-path.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gcc/analyzer/checker-path.cc b/gcc/analyzer/checker-path.cc
index cbe24a2058a..221042ee010 100644
--- a/gcc/analyzer/checker-path.cc
+++ b/gcc/analyzer/checker-path.cc
@@ -273,8 +273,10 @@ checker_path::inject_any_inlined_call_events (logger *logger)
 	       !iter.done_p (); iter.next ())
 	    {
 	      logger->start_log_line ();
-	      logger->log_partial ("  %qE (%p), fndecl: %qE, callsite: 0x%x",
-				   iter.get_block (), iter.get_block (),
+	      logger->log_partial ("  %qE", iter.get_block ());
+	      if (!flag_dump_noaddr)
+		logger->log_partial (" (%p)", iter.get_block ());
+	      logger->log_partial (", fndecl: %qE, callsite: 0x%x",
 				   iter.get_fndecl (), iter.get_callsite ());
 	      if (iter.get_callsite ())
 		dump_location (logger->get_printer (), iter.get_callsite ());

                 reply	other threads:[~2023-02-15 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230215102248.8FB1C385842B@sourceware.org \
    --to=pheeck@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).