diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2023-10-31 17:27:15 +0100 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-11-21 10:57:42 +0100 |
commit | 35510341fc24eed8fa3cd08171dc560b6d833fb2 (patch) | |
tree | 1bfea3732fe6679667b9e369984a97c49205d47f /gcc | |
parent | 3827a017667532656285c9cf7f6448ff688221a9 (diff) | |
download | gcc-35510341fc24eed8fa3cd08171dc560b6d833fb2.zip gcc-35510341fc24eed8fa3cd08171dc560b6d833fb2.tar.gz gcc-35510341fc24eed8fa3cd08171dc560b6d833fb2.tar.bz2 |
ada: Fix internal error on 'Address of task component
This happens when the prefix of the selected component is of an access type,
i.e. there is an implicit dereference. because the prefix is not resolved.
gcc/ada/
* sem_attr.adb (Resolve_Attribute) <Attribute_Address>: Remove the
bypass for prefixes with task type.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_attr.adb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 531bc11..000253e 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -12119,9 +12119,7 @@ package body Sem_Attr is Note_Possible_Modification (P, Sure => False); end if; - if Nkind (P) in N_Subexpr - and then Is_Overloaded (P) - then + if Nkind (P) in N_Subexpr and then Is_Overloaded (P) then Get_First_Interp (P, Index, It); Get_Next_Interp (Index, It); @@ -12135,11 +12133,7 @@ package body Sem_Attr is if not Is_Entity_Name (P) or else not Is_Overloadable (Entity (P)) then - if not Is_Task_Type (Etype (P)) - or else Nkind (P) = N_Explicit_Dereference - then - Resolve (P); - end if; + Resolve (P); end if; -- If this is the name of a derived subprogram, or that of a |