public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-1678] [Ada] Also deal with private actual types in latest change
@ 2022-07-13 10:04 Pierre-Marie de Rodat
0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-07-13 10:04 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:258814a99e74fcc1ab9cccb16b4d14c997d83690
commit r13-1678-g258814a99e74fcc1ab9cccb16b4d14c997d83690
Author: Eric Botcazou <ebotcazou@adacore.com>
Date: Fri Jun 24 19:28:53 2022 +0200
[Ada] Also deal with private actual types in latest change
gcc/ada/
* gcc-interface/decl.cc (Gigi_Cloned_Subtype): Handle private case.
Diff:
---
gcc/ada/gcc-interface/decl.cc | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/gcc/ada/gcc-interface/decl.cc b/gcc/ada/gcc-interface/decl.cc
index 8449c991e2b..53c84613e6a 100644
--- a/gcc/ada/gcc-interface/decl.cc
+++ b/gcc/ada/gcc-interface/decl.cc
@@ -5171,6 +5171,19 @@ Gigi_Cloned_Subtype (Entity_Id gnat_entity)
&& Present (Generic_Parent_Type (gnat_decl))
&& Is_Entity_Name (Subtype_Indication (gnat_decl)))
return Entity (Subtype_Indication (gnat_decl));
+
+ /* Likewise for the full view of such subtypes when they are private. */
+ if (Is_Itype (gnat_entity))
+ {
+ gnat_decl = Associated_Node_For_Itype (gnat_entity);
+ if (Present (gnat_decl)
+ && Nkind (gnat_decl) == N_Subtype_Declaration
+ && Is_Private_Type (Defining_Identifier (gnat_decl))
+ && Full_View (Defining_Identifier (gnat_decl)) == gnat_entity
+ && Present (Generic_Parent_Type (gnat_decl))
+ && Is_Entity_Name (Subtype_Indication (gnat_decl)))
+ return Entity (Subtype_Indication (gnat_decl));
+ }
break;
default:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-07-13 10:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 10:04 [gcc r13-1678] [Ada] Also deal with private actual types in latest change Pierre-Marie de Rodat
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).