diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2023-09-26 00:17:12 +0200 |
---|---|---|
committer | Marc Poulhiès <poulhies@adacore.com> | 2023-11-07 10:15:01 +0100 |
commit | b618441a25a5ab963f26a8415eb43c87cfcf6505 (patch) | |
tree | 47005d3937b094af21e1b6fdafad5a1b13c94ac8 /gcc | |
parent | a4a24e5868c5e2b626f399cd657573a6bf81e646 (diff) | |
download | gcc-b618441a25a5ab963f26a8415eb43c87cfcf6505.zip gcc-b618441a25a5ab963f26a8415eb43c87cfcf6505.tar.gz gcc-b618441a25a5ab963f26a8415eb43c87cfcf6505.tar.bz2 |
ada: Fix handling of actual subtypes for expanded names
gcc/ada/
* sem_util.adb
(Get_Actual_Subtype,Get_Actual_Subtype_If_Available): Fix handling
of expanded names.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_util.adb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ada/sem_util.adb b/gcc/ada/sem_util.adb index 5440c6a..da531e5 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 |