* gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Nov 2014 18:52:07 +0000 (18:52 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 5 Nov 2014 18:52:07 +0000 (18:52 +0000)
the SLOC of the node on the call to set_jmpbuf_address_soft emitted
on block entry with SJLJ.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@217152 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ada/ChangeLog
gcc/ada/gcc-interface/trans.c

index 916715a..7e8e9a1 100644 (file)
@@ -1,5 +1,11 @@
 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
 
+       * gcc-interface/trans.c (Handled_Sequence_Of_Statements_to_gnu): Set
+       the SLOC of the node on the call to set_jmpbuf_address_soft emitted
+       on block entry with SJLJ.
+
+2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
+
        * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
        conflicting inlining status of nested subprograms to...
        * gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
index 258b79c..05b81ef 100644 (file)
@@ -4629,9 +4629,13 @@ Handled_Sequence_Of_Statements_to_gnu (Node_Id gnat_node)
   start_stmt_group ();
 
   if (setjmp_longjmp)
-    add_stmt (build_call_n_expr (set_jmpbuf_decl, 1,
-                                build_unary_op (ADDR_EXPR, NULL_TREE,
-                                                gnu_jmpbuf_decl)));
+    {
+      gnu_expr = build_call_n_expr (set_jmpbuf_decl, 1,
+                                   build_unary_op (ADDR_EXPR, NULL_TREE,
+                                                   gnu_jmpbuf_decl));
+      set_expr_location_from_node (gnu_expr, gnat_node);
+      add_stmt (gnu_expr);
+    }
 
   if (Present (First_Real_Statement (gnat_node)))
     process_decls (Statements (gnat_node), Empty,