aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/exp_aggr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/exp_aggr.adb')
-rw-r--r--gcc/ada/exp_aggr.adb17
1 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ada/exp_aggr.adb b/gcc/ada/exp_aggr.adb
index a54ebe8..03b686c 100644
--- a/gcc/ada/exp_aggr.adb
+++ b/gcc/ada/exp_aggr.adb
@@ -1984,10 +1984,23 @@ package body Exp_Aggr is
--------------------------------
function Get_Constraint_Association (T : Entity_Id) return Node_Id is
- Typ_Def : constant Node_Id := Type_Definition (Parent (T));
- Indic : constant Node_Id := Subtype_Indication (Typ_Def);
+ Indic : Node_Id;
+ Typ : Entity_Id;
begin
+ Typ := T;
+
+ -- Handle private types in instances
+
+ if In_Instance
+ and then Is_Private_Type (Typ)
+ and then Present (Full_View (Typ))
+ then
+ Typ := Full_View (Typ);
+ end if;
+
+ Indic := Subtype_Indication (Type_Definition (Parent (Typ)));
+
-- ??? Also need to cover case of a type mark denoting a subtype
-- with constraint.