public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Malcolm <dmalcolm@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: David Malcolm <dmalcolm@redhat.com>
Subject: [committed] analyzer: fix nondeterminism in logs
Date: Wed, 23 Nov 2022 20:52:21 -0500	[thread overview]
Message-ID: <20221124015221.3367288-1-dmalcolm@redhat.com> (raw)

Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu.
Pushed to trunk as r13-4275-ge0f18b87bfaf0b.

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>
---
 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 ());
-- 
2.26.3


                 reply	other threads:[~2022-11-24  1:52 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=20221124015221.3367288-1-dmalcolm@redhat.com \
    --to=dmalcolm@redhat.com \
    --cc=gcc-patches@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).