diff options
author | Ed Schonberg <schonberg@adacore.com> | 2005-07-04 15:30:32 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2005-07-04 15:30:32 +0200 |
commit | ac0ed7268a8cf613955dab97b4dfa1e3b6a243d4 (patch) | |
tree | 6bed2c520beed9caa18834439f1264f2067763f3 /gcc | |
parent | 21ff92b4e3c0e302181754b240c3246cfda4aead (diff) | |
download | gcc-ac0ed7268a8cf613955dab97b4dfa1e3b6a243d4.zip gcc-ac0ed7268a8cf613955dab97b4dfa1e3b6a243d4.tar.gz gcc-ac0ed7268a8cf613955dab97b4dfa1e3b6a243d4.tar.bz2 |
sem_util.adb (Is_Object_Reference): An indexed or selected component whose prefix is an implicit dereference is an...
2005-07-04 Ed Schonberg <schonberg@adacore.com>
* sem_util.adb (Is_Object_Reference): An indexed or selected component
whose prefix is an implicit dereference is an object reference. Removes
spurious errors when compiling with -gnatc.
From-SVN: r101592
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_util.adb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 04107a5..4d3577e 100644 --- a/gcc/ada/sem_util.adb +++ b/gcc/ada/sem_util.adb @@ -4074,7 +4074,9 @@ package body Sem_Util is else case Nkind (N) is when N_Indexed_Component | N_Slice => - return Is_Object_Reference (Prefix (N)); + return + Is_Object_Reference (Prefix (N)) + or else Is_Access_Type (Etype (Prefix (N))); -- In Ada95, a function call is a constant object @@ -4089,7 +4091,9 @@ package body Sem_Util is when N_Selected_Component => return Is_Object_Reference (Selector_Name (N)) - and then Is_Object_Reference (Prefix (N)); + and then + (Is_Object_Reference (Prefix (N)) + or else Is_Access_Type (Etype (Prefix (N)))); when N_Explicit_Dereference => return True; |