Commit 4a7dedcb by Bob Duff Committed by Arnaud Charlet

exp_ch5.adb, [...]: Avoid use of No_Position in Sloc of generated nodes...

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
parent 4017021b
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> 2009-04-10 Ed Schonberg <schonberg@adacore.com>
* sem_prag.adb (Analyze_Pragma, case Task_Name): Do not expand argument * sem_prag.adb (Analyze_Pragma, case Task_Name): Do not expand argument
...@@ -3630,8 +3630,7 @@ package body Exp_Ch5 is ...@@ -3630,8 +3630,7 @@ package body Exp_Ch5 is
Call := Call :=
Make_Procedure_Call_Statement (Loc, Make_Procedure_Call_Statement (Loc,
Name => New_Reference_To Name => New_Reference_To (RTE (RE_Complete_Rendezvous), Loc));
(RTE (RE_Complete_Rendezvous), No_Location));
Insert_Before (N, Call); Insert_Before (N, Call);
-- why not insert actions here??? -- why not insert actions here???
Analyze (Call); Analyze (Call);
......
...@@ -740,7 +740,8 @@ package body Exp_Ch9 is ...@@ -740,7 +740,8 @@ package body Exp_Ch9 is
-- processing, has already been added for the expansion of requeue -- processing, has already been added for the expansion of requeue
-- statements. -- 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); Insert_Before (Last (Statements (Stats)), Call);
Analyze (Call); Analyze (Call);
...@@ -751,7 +752,8 @@ package body Exp_Ch9 is ...@@ -751,7 +752,8 @@ package body Exp_Ch9 is
Hand := First (Exception_Handlers (Stats)); Hand := First (Exception_Handlers (Stats));
while Present (Hand) loop 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)); Append (Call, Statements (Hand));
Analyze (Call); Analyze (Call);
Next (Hand); Next (Hand);
...@@ -786,13 +788,13 @@ package body Exp_Ch9 is ...@@ -786,13 +788,13 @@ package body Exp_Ch9 is
Exception_Choices => New_List (Ohandle), Exception_Choices => New_List (Ohandle),
Statements => New_List ( Statements => New_List (
Make_Procedure_Call_Statement (No_Location, Make_Procedure_Call_Statement (Sloc (Stats),
Name => New_Reference_To ( Name => New_Reference_To (
RTE (RE_Exceptional_Complete_Rendezvous), No_Location), RTE (RE_Exceptional_Complete_Rendezvous), Sloc (Stats)),
Parameter_Associations => New_List ( Parameter_Associations => New_List (
Make_Function_Call (No_Location, Make_Function_Call (Sloc (Stats),
Name => New_Reference_To ( 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 Set_Parent (New_S, Astat); -- temp parent for Analyze call
Analyze_Exception_Handlers (Exception_Handlers (New_S)); Analyze_Exception_Handlers (Exception_Handlers (New_S));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment