OSDN Git Service

2011-08-30 Bob Duff <duff@adacore.com>
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Aug 2011 13:12:16 +0000 (13:12 +0000)
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 30 Aug 2011 13:12:16 +0000 (13:12 +0000)
* 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.

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

gcc/ada/ChangeLog
gcc/ada/s-taskin.ads
gcc/ada/sem_res.adb

index ca62053..1dfd423 100644 (file)
@@ -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
index 40772c9..971d4ee 100644 (file)
@@ -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)
 
index 3670221..409ace4 100644 (file)
@@ -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