]> gcc.gnu.org Git - gcc.git/commitdiff
exp_ch5.adb, [...]: Avoid use of No_Position in Sloc of generated nodes...
authorBob Duff <duff@adacore.com>
Fri, 10 Apr 2009 10:26:25 +0000 (10:26 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Fri, 10 Apr 2009 10:26:25 +0000 (12:26 +0200)
2009-04-10  Bob Duff  <duff@adacore.com>

* exp_ch5.adb, exp_ch9.adb: Avoid use of No_Position in Sloc of
generated nodes, because it might confuse various circuits in the FE.

From-SVN: r145883

gcc/ada/ChangeLog
gcc/ada/exp_ch5.adb
gcc/ada/exp_ch9.adb

index 71291641b7445407bf7b744e00bdfe614d2b90d0..4afdf325c5073c10b941483eb8ba7c07e9d1d431 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-10  Bob Duff  <duff@adacore.com>
+
+       * exp_ch5.adb, exp_ch9.adb: Avoid use of No_Position in Sloc of
+       generated nodes, because it might confuse various circuits in the FE.
+
 2009-04-10  Ed Schonberg  <schonberg@adacore.com>
 
        * sem_prag.adb (Analyze_Pragma, case Task_Name): Do not expand argument
index 83f20774cb0ea9ba9f093dfc521ff5d08ff6fe13..b58f4f12939828008cec9a7aa4c00f2671251097 100644 (file)
@@ -3630,8 +3630,7 @@ package body Exp_Ch5 is
 
          Call :=
            Make_Procedure_Call_Statement (Loc,
-             Name => New_Reference_To
-                       (RTE (RE_Complete_Rendezvous), No_Location));
+             Name => New_Reference_To (RTE (RE_Complete_Rendezvous), Loc));
          Insert_Before (N, Call);
          --  why not insert actions here???
          Analyze (Call);
index a95835da3cf3541518ce92a54c585c4216b995a2..8ff47dcdf4bde91d3312a76dbcf0d6b330db42cf 100644 (file)
@@ -740,7 +740,8 @@ package body Exp_Ch9 is
       --  processing, has already been added for the expansion of requeue
       --  statements.
 
-      Call := Build_Runtime_Call (No_Location, RE_Complete_Rendezvous);
+      Call := Build_Runtime_Call (Sloc (Last (Statements (Stats))),
+                                  RE_Complete_Rendezvous);
       Insert_Before (Last (Statements (Stats)), Call);
       Analyze (Call);
 
@@ -751,7 +752,8 @@ package body Exp_Ch9 is
          Hand := First (Exception_Handlers (Stats));
 
          while Present (Hand) loop
-            Call := Build_Runtime_Call (No_Location, RE_Complete_Rendezvous);
+            Call := Build_Runtime_Call (Sloc (Last (Statements (Hand))),
+                                        RE_Complete_Rendezvous);
             Append (Call, Statements (Hand));
             Analyze (Call);
             Next (Hand);
@@ -786,13 +788,13 @@ package body Exp_Ch9 is
             Exception_Choices => New_List (Ohandle),
 
             Statements =>  New_List (
-              Make_Procedure_Call_Statement (No_Location,
+              Make_Procedure_Call_Statement (Sloc (Stats),
                 Name => New_Reference_To (
-                  RTE (RE_Exceptional_Complete_Rendezvous), No_Location),
+                  RTE (RE_Exceptional_Complete_Rendezvous), Sloc (Stats)),
                 Parameter_Associations => New_List (
-                  Make_Function_Call (No_Location,
+                  Make_Function_Call (Sloc (Stats),
                     Name => New_Reference_To (
-                      RTE (RE_Get_GNAT_Exception), No_Location))))))));
+                      RTE (RE_Get_GNAT_Exception), Sloc (Stats)))))))));
 
       Set_Parent (New_S, Astat); -- temp parent for Analyze call
       Analyze_Exception_Handlers (Exception_Handlers (New_S));
This page took 0.125461 seconds and 5 git commands to generate.