public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Improve uninit diagnostic dumps
Date: Wed, 30 Nov 2022 12:52:47 +0100 (CET)	[thread overview]
Message-ID: <20221130115247.C39A113A70@imap2.suse-dmz.suse.de> (raw)

The following dumps the edge a use is uninitialized in a PHI.

Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.

	* tree-ssa-uninit.cc (find_uninit_use): Dump the edge for a
	PHI node.
---
 gcc/tree-ssa-uninit.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/tree-ssa-uninit.cc b/gcc/tree-ssa-uninit.cc
index bf2e50511af..7fbc384f2d4 100644
--- a/gcc/tree-ssa-uninit.cc
+++ b/gcc/tree-ssa-uninit.cc
@@ -1249,8 +1249,8 @@ find_uninit_use (gphi *phi, unsigned uninit_opnds, int *bb_to_rpo)
 
 	  if (dump_file && (dump_flags & TDF_DETAILS))
 	    {
-	      fprintf (dump_file, "Found unguarded use in bb %u: ",
-		       use_bb->index);
+	      fprintf (dump_file, "Found unguarded use on edge %u -> %u: ",
+		       e->src->index, e->dest->index);
 	      print_gimple_stmt (dump_file, use_stmt, 0);
 	    }
 	  /* Found a phi use that is not guarded, mark the phi_result as
-- 
2.35.3

                 reply	other threads:[~2022-11-30 11: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=20221130115247.C39A113A70@imap2.suse-dmz.suse.de \
    --to=rguenther@suse.de \
    --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).