public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] analyzer: fix nondeterminism in logs
@ 2022-11-24  1:52 David Malcolm
  0 siblings, 0 replies; only message in thread
From: David Malcolm @ 2022-11-24  1:52 UTC (permalink / raw)
  To: gcc-patches; +Cc: David Malcolm

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-24  1:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24  1:52 [committed] analyzer: fix nondeterminism in logs David Malcolm

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).