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  <ebotca...@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);

Reply via email to