* [COMMITTED] ada: Fix handling of actual subtypes for expanded names
@ 2023-11-07 9:19 Marc Poulhiès
0 siblings, 0 replies; only message in thread
From: Marc Poulhiès @ 2023-11-07 9:19 UTC (permalink / raw)
To: gcc-patches; +Cc: Piotr Trojanek
From: Piotr Trojanek <trojanek@adacore.com>
gcc/ada/
* sem_util.adb
(Get_Actual_Subtype,Get_Actual_Subtype_If_Available): Fix handling
of expanded names.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/sem_util.adb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb
index 5440c6ae0aa..da531e53466 100644
--- a/gcc/ada/sem_util.adb
+++ b/gcc/ada/sem_util.adb
@@ -10104,7 +10104,7 @@ package body Sem_Util is
-- formal, or a variable or constant object, then we get the actual
-- subtype from the referenced entity if one has been built.
- if Nkind (N) = N_Identifier
+ if Nkind (N) in N_Identifier | N_Expanded_Name
and then
(Is_Formal (Entity (N))
or else Ekind (Entity (N)) = E_Constant
@@ -10225,7 +10225,7 @@ package body Sem_Util is
-- formal, or a variable or constant object, then we get the actual
-- subtype from the referenced entity if one has been built.
- if Nkind (N) = N_Identifier
+ if Nkind (N) in N_Identifier | N_Expanded_Name
and then
(Is_Formal (Entity (N))
or else Ekind (Entity (N)) = E_Constant
--
2.42.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-07 9:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-07 9:19 [COMMITTED] ada: Fix handling of actual subtypes for expanded names 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).