public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: gcc-patches@gcc.gnu.org
Subject: [PATCH] cfg: Dump goto_locus if -fdump-*-*-blocks-details
Date: Wed, 2 Mar 2022 10:38:04 +0100	[thread overview]
Message-ID: <Yh86/AnXVJpoV6yR@tucnak> (raw)

Hi!

When debugging the PR104589 issue, I've run into a problem that
goto_locus doesn't show up in the logs, so it wasn't clear if
the bug hasn't been introduced far earlier just by divergence
in goto_locus of some edge.

Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk,
or for GCC 13?

2022-03-02  Jakub Jelinek  <jakub@redhat.com>

	* cfg.cc (dump_edge_info): Dump goto_locus if present.

--- gcc/cfg.cc.jj	2022-01-18 11:58:58.944991171 +0100
+++ gcc/cfg.cc	2022-03-01 15:33:08.170217978 +0100
@@ -555,6 +555,10 @@ dump_edge_info (FILE *file, edge e, dump
 
       fputc (')', file);
     }
+
+  if (do_details && LOCATION_LOCUS (e->goto_locus) > BUILTINS_LOCATION)
+    fprintf (file, " %s:%d:%d", LOCATION_FILE (e->goto_locus),
+	     LOCATION_LINE (e->goto_locus), LOCATION_COLUMN (e->goto_locus));
 }
 
 DEBUG_FUNCTION void

	Jakub


             reply	other threads:[~2022-03-02  9:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-02  9:38 Jakub Jelinek [this message]
2022-03-02  9:45 ` Richard Biener

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=Yh86/AnXVJpoV6yR@tucnak \
    --to=jakub@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).