This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Put source location on return edges
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Fri, 06 Jun 2014 09:36:50 +0200
- Subject: Put source location on return edges
- Authentication-results: sourceware.org; auth=none
Similarly to what's done for gotos and conditional expressions.
Tested on x86_64-suse-linux, applied on the mainline as obvious.
2014-06-06 Eric Botcazou <ebotcazou@adacore.com>
* tree-cfg.c (make_edges) <GIMPLE_RETURN>: Put a location onto the edge.
--
Eric Botcazou
Index: tree-cfg.c
===================================================================
--- tree-cfg.c (revision 211101)
+++ tree-cfg.c (working copy)
@@ -763,8 +763,11 @@ make_edges (void)
fallthru = false;
break;
case GIMPLE_RETURN:
- make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), 0);
- fallthru = false;
+ {
+ edge e = make_edge (bb, EXIT_BLOCK_PTR_FOR_FN (cfun), 0);
+ e->goto_locus = gimple_location (last);
+ fallthru = false;
+ }
break;
case GIMPLE_COND:
make_cond_expr_edges (bb);