From: Arnaud Charlet Date: Tue, 30 Aug 2011 13:12:16 +0000 (+0200) Subject: [multiple changes] X-Git-Tag: releases/gcc-4.7.0~4126 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=747de90b1117a02ac82f097c17315ba461dcd2df;p=thirdparty%2Fgcc.git [multiple changes] 2011-08-30 Bob Duff * s-taskin.ads: Minor comment fix. 2011-08-30 Ed Schonberg * 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index ca620533c9f4..1dfd423be7d7 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,13 @@ +2011-08-30 Bob Duff + + * s-taskin.ads: Minor comment fix. + +2011-08-30 Ed Schonberg + + * 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 * gcc-interface/Makefile.in (../stamp-gnatlib1-$(RTSDIR)): Copy diff --git a/gcc/ada/s-taskin.ads b/gcc/ada/s-taskin.ads index 40772c94d095..971d4ee92bae 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 3670221e0bbe..409ace4f8d27 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