diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-30 15:12:16 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2011-08-30 15:12:16 +0200 |
commit | 747de90b1117a02ac82f097c17315ba461dcd2df (patch) | |
tree | 855c7b1dcd4fa0232f9398afca9bd3ed23aef78c | |
parent | cb89a1716cbc3cee3a712a586ec0ebebbb5b750f (diff) | |
download | gcc-747de90b1117a02ac82f097c17315ba461dcd2df.zip gcc-747de90b1117a02ac82f097c17315ba461dcd2df.tar.gz gcc-747de90b1117a02ac82f097c17315ba461dcd2df.tar.bz2 |
[multiple changes]
2011-08-30 Bob Duff <duff@adacore.com>
* s-taskin.ads: Minor comment fix.
2011-08-30 Ed Schonberg <schonberg@adacore.com>
* sem_res.adb (Check_Parameterless_Call): If the node is a selected
component and the selector is a dispatching operation, check if it is
a prefixed call before rewriting as a parameterless function call.
From-SVN: r178294
-rw-r--r-- | gcc/ada/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/ada/s-taskin.ads | 4 | ||||
-rw-r--r-- | gcc/ada/sem_res.adb | 14 |
3 files changed, 26 insertions, 2 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ca62053..1dfd423 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2011-08-30 Bob Duff <duff@adacore.com> + + * s-taskin.ads: Minor comment fix. + +2011-08-30 Ed Schonberg <schonberg@adacore.com> + + * sem_res.adb (Check_Parameterless_Call): If the node is a selected + component and the selector is a dispatching operation, check if it is + a prefixed call before rewriting as a parameterless function call. + 2011-08-29 Jakub Jelinek <jakub@redhat.com> * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads index 40772c9..971d4ee 100644 --- a/gcc/ada/s-taskin.ads +++ b/gcc/ada/s-taskin.ads @@ -585,8 +585,8 @@ package System.Tasking is -- Master_Completion_Sleep (phase 1) -- This is the number dependent tasks of a master being completed by - -- Self that are not activated, not terminated, and not waiting on a - -- terminate alternative. + -- Self that are activated, but have not yet terminated, and are not + -- waiting on a terminate alternative. -- Master_Completion_2_Sleep (phase 2) diff --git a/gcc/ada/sem_res.adb b/gcc/ada/sem_res.adb index 3670221..409ace4 100644 --- a/gcc/ada/sem_res.adb +++ b/gcc/ada/sem_res.adb @@ -1115,6 +1115,20 @@ package body Sem_Res is if Nkind (Parent (N)) /= N_Function_Call or else N /= Name (Parent (N)) then + + -- This may be a prefixed call that was not fully analyzed, e.g. + -- an actual in an instance. + + if Ada_Version >= Ada_2005 + and then Nkind (N) = N_Selected_Component + and then Is_Dispatching_Operation (Entity (Selector_Name (N))) + then + Analyze_Selected_Component (N); + if Nkind (N) /= N_Selected_Component then + return; + end if; + end if; + Nam := New_Copy (N); -- If overloaded, overload set belongs to new copy |