From: ebotcazou Date: Wed, 14 Nov 2007 18:31:57 +0000 (+0000) Subject: * trans.c (call_to_gnu): Always set the source location on the call X-Git-Tag: upstream/4.9.2~45082 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e746f64d341e6bd4deea2945288106684d38265d;p=platform%2Fupstream%2Flinaro-gcc.git * trans.c (call_to_gnu): Always set the source location on the call expression. If the function returns-by-target, also set it on the address expression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130184 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cefae39..c90fe05 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2007-11-14 Eric Botcazou + + * trans.c (call_to_gnu): Always set the source location on the call + expression. If the function returns-by-target, also set it on the + address expression. + 2007-11-14 Samuel Tardieu * adaint.c init.c initialize.c link.c: Remove system-specific diff --git a/gcc/ada/trans.c b/gcc/ada/trans.c index 65d45b0..cd3c6a6 100644 --- a/gcc/ada/trans.c +++ b/gcc/ada/trans.c @@ -2311,6 +2311,7 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) gnu_subprog_call = build_call_list (TREE_TYPE (gnu_subprog_type), gnu_subprog_addr, nreverse (gnu_actual_list)); + set_expr_location_from_node (gnu_subprog_call, gnat_node); /* If we return by passing a target, the result is the target after the call. We must not emit the call directly here because this might be @@ -2336,6 +2337,7 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) tree gnu_target_address = build_unary_op (ADDR_EXPR, NULL_TREE, gnu_target); + set_expr_location_from_node (gnu_target_address, gnat_node); gnu_result = build2 (COMPOUND_EXPR, TREE_TYPE (gnu_target_address), @@ -2491,10 +2493,7 @@ call_to_gnu (Node_Id gnat_node, tree *gnu_result_type_p, tree gnu_target) } } else - { - set_expr_location_from_node (gnu_subprog_call, gnat_node); - append_to_statement_list (gnu_subprog_call, &gnu_before_list); - } + append_to_statement_list (gnu_subprog_call, &gnu_before_list); append_to_statement_list (gnu_after_list, &gnu_before_list); return gnu_before_list;