From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2153) id F13013858010; Wed, 2 Mar 2022 09:49:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F13013858010 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jakub Jelinek To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-7448] cfg: Dump goto_locus if -fdump-*-*-blocks-details X-Act-Checkin: gcc X-Git-Author: Jakub Jelinek X-Git-Refname: refs/heads/master X-Git-Oldrev: 2e1b00367abaf8b6dbb47fd8518d9ac69c326a06 X-Git-Newrev: 58394373a70f4381bcc6d86423cffa05759b699c Message-Id: <20220302094929.F13013858010@sourceware.org> Date: Wed, 2 Mar 2022 09:49:29 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2022 09:49:30 -0000 https://gcc.gnu.org/g:58394373a70f4381bcc6d86423cffa05759b699c commit r12-7448-g58394373a70f4381bcc6d86423cffa05759b699c Author: Jakub Jelinek Date: Wed Mar 2 10:48:55 2022 +0100 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 * cfg.cc (dump_edge_info): Dump goto_locus if present. Diff: --- gcc/cfg.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gcc/cfg.cc b/gcc/cfg.cc index e4ce360bd87..da781ba2da8 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