diff options
author | Bob Duff <duff@adacore.com> | 2009-04-10 10:26:25 +0000 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2009-04-10 12:26:25 +0200 |
commit | 4a7dedcb0c5663a60814e220d878b908305439f7 (patch) | |
tree | 666777d7f643db3ab30ee85dea628ca6cd064a15 /gcc/ada | |
parent | 4017021b3585d2d9c0ce2521e32fa0a532c25cab (diff) | |
download | gcc-4a7dedcb0c5663a60814e220d878b908305439f7.zip gcc-4a7dedcb0c5663a60814e220d878b908305439f7.tar.gz gcc-4a7dedcb0c5663a60814e220d878b908305439f7.tar.bz2 |
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
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/ada/exp_ch5.adb | 3 | ||||
-rw-r--r-- | gcc/ada/exp_ch9.adb | 14 |
3 files changed, 14 insertions, 8 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 7129164..4afdf32 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -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 diff --git a/gcc/ada/exp_ch5.adb b/gcc/ada/exp_ch5.adb index 83f2077..b58f4f1 100644 --- a/gcc/ada/exp_ch5.adb +++ b/gcc/ada/exp_ch5.adb @@ -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); diff --git a/gcc/ada/exp_ch9.adb b/gcc/ada/exp_ch9.adb index a95835d..8ff47dc 100644 --- a/gcc/ada/exp_ch9.adb +++ b/gcc/ada/exp_ch9.adb @@ -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)); |