aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-03-02 10:48:55 +0100
committerJakub Jelinek <jakub@redhat.com>2022-03-02 10:48:55 +0100
commit58394373a70f4381bcc6d86423cffa05759b699c (patch)
tree7f80520e99d56536a418bbe312a7a4542bee33ad
parent2e1b00367abaf8b6dbb47fd8518d9ac69c326a06 (diff)
downloadgcc-58394373a70f4381bcc6d86423cffa05759b699c.zip
gcc-58394373a70f4381bcc6d86423cffa05759b699c.tar.gz
gcc-58394373a70f4381bcc6d86423cffa05759b699c.tar.bz2
cfg: Dump goto_locus if -fdump-*-*-blocks-details
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. 2022-03-02 Jakub Jelinek <jakub@redhat.com> * cfg.cc (dump_edge_info): Dump goto_locus if present.
-rw-r--r--gcc/cfg.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cfg.cc b/gcc/cfg.cc
index e4ce360..da781ba 100644
--- a/gcc/cfg.cc
+++ b/gcc/cfg.cc
@@ -555,6 +555,10 @@ dump_edge_info (FILE *file, edge e, dump_flags_t flags, int do_succ)
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