diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-27 12:21:23 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2015-10-27 12:21:23 +0100 |
commit | f6f401140a4a93899d25eeb05a537d35f4324f6f (patch) | |
tree | d27facc59cc94a59a1d88d59f763949e8b0d6e65 /gcc/ada/sem_ch8.adb | |
parent | 3f8743e802e6927c8ea91911fd9e313137b73c50 (diff) | |
download | gcc-f6f401140a4a93899d25eeb05a537d35f4324f6f.zip gcc-f6f401140a4a93899d25eeb05a537d35f4324f6f.tar.gz gcc-f6f401140a4a93899d25eeb05a537d35f4324f6f.tar.bz2 |
[multiple changes]
2015-10-27 Yannick Moy <moy@adacore.com>
* 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 <schonberg@adacore.com>
* 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
Diffstat (limited to 'gcc/ada/sem_ch8.adb')
-rw-r--r-- | gcc/ada/sem_ch8.adb | 11 |
1 files changed, 7 insertions, 4 deletions
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)); |