From f6f401140a4a93899d25eeb05a537d35f4324f6f Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Tue, 27 Oct 2015 12:21:23 +0100 Subject: [multiple changes] 2015-10-27 Yannick Moy * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Library_Package): detect library-level subprograms and handle entries as subprograms, i.e. now both library-level subprograms and entry bodies act as enclosing scopes. (Traverse_Declarations_Or_Statements): process entry bodies just like subprogram bodies. * lib-xref.ads (Enclosing_Subprogram_Or_Library_Package): comment simplified while keeping its the meaning and minor typo fixed ("of" -> "or"). * spark_xrefs.ads (Xref Section): fix in description of the ALI line for subprogram calls; such lines start with captial "F" followed by a space. 2015-10-27 Ed Schonberg * sem_ch8.adb (Find_Direct_Name): A parameter association is a legal context for applying an implicit dereference. (Analyze_Expanded_Name): Minor code cleanup. From-SVN: r229418 --- gcc/ada/sem_ch8.adb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'gcc/ada/sem_ch8.adb') diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb index bf39088..f02ec52 100644 --- a/gcc/ada/sem_ch8.adb +++ b/gcc/ada/sem_ch8.adb @@ -597,8 +597,10 @@ package body Sem_Ch8 is begin -- If the entity pointer is already set, this is an internal node, or a -- node that is analyzed more than once, after a tree modification. In - -- such a case there is no resolution to perform, just set the type. For - -- completeness, analyze prefix as well. + -- such a case there is no resolution to perform, just set the type. + -- In either case, start by analyzing the prefix. + + Analyze (Prefix (N)); if Present (Entity (N)) then if Is_Type (Entity (N)) then @@ -607,7 +609,6 @@ package body Sem_Ch8 is Set_Etype (N, Etype (Entity (N))); end if; - Analyze (Prefix (N)); return; else Find_Expanded_Name (N); @@ -5615,12 +5616,14 @@ package body Sem_Ch8 is Set_Entity_Or_Discriminal (N, E); -- The name may designate a generalized reference, in which case - -- the dereference interpretation will be included. + -- the dereference interpretation will be included. Context is + -- one in which a name is legal. if Ada_Version >= Ada_2012 and then (Nkind (Parent (N)) in N_Subexpr or else Nkind_In (Parent (N), N_Object_Declaration, + N_Parameter_Association, N_Assignment_Statement)) then Check_Implicit_Dereference (N, Etype (E)); -- cgit v1.1