summaryrefslogtreecommitdiffstats
path: root/gcc/ada
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 12:26:43 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-02 12:26:43 +0000
commita9cd46a66b4cca57101f0abcf7b58d78502d066a (patch)
treeddee0f10352af6418105d3999001db5c3b8a432a /gcc/ada
parentaf9fed8fd54f79bdf8db5cc3c1bb060000437a8e (diff)
downloadppe42-gcc-a9cd46a66b4cca57101f0abcf7b58d78502d066a.tar.gz
ppe42-gcc-a9cd46a66b4cca57101f0abcf7b58d78502d066a.zip
2012-10-02 Ed Schonberg <schonberg@adacore.com>
* sem_ch8.adb (Find_Direct_Name): The left-hand side of an assignment may designate a generalized reference. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191976 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada')
-rw-r--r--gcc/ada/ChangeLog5
-rw-r--r--gcc/ada/sem_ch8.adb7
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 436651cfe97..ac3238876ab 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,8 @@
+2012-10-02 Ed Schonberg <schonberg@adacore.com>
+
+ * sem_ch8.adb (Find_Direct_Name): The left-hand side of an
+ assignment may designate a generalized reference.
+
2012-10-02 Eric Botcazou <ebotcazou@adacore.com>
* types.h (N_Return_Statement): Delete.
diff --git a/gcc/ada/sem_ch8.adb b/gcc/ada/sem_ch8.adb
index 53ff3274e8b..db47b4a3e74 100644
--- a/gcc/ada/sem_ch8.adb
+++ b/gcc/ada/sem_ch8.adb
@@ -5021,10 +5021,15 @@ 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.
+
if Ada_Version >= Ada_2012
and then
(Nkind (Parent (N)) in N_Subexpr
- or else Nkind (Parent (N)) = N_Object_Declaration)
+ or else
+ Nkind_In (Parent (N), N_Object_Declaration,
+ N_Assignment_Statement))
then
Check_Implicit_Dereference (N, Etype (E));
end if;
OpenPOWER on IntegriCloud