* [COMMITTED] ada: Fix internal error on 'Address of task component
@ 2023-11-21 10:00 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-11-21 10:00 UTC (permalink / raw)
To: gcc-patches; +Cc: Eric Botcazou
From: Eric Botcazou <ebotcazou@adacore.com>
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.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_attr.adb | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb
index 531bc112c91..000253e7993 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
--
2.42.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-21 10:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-21 10:00 [COMMITTED] ada: Fix internal error on 'Address of task component Marc Poulhiès
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).