summaryrefslogtreecommitdiffstats
path: root/gcc/ada/sem_aggr.adb
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/sem_aggr.adb')
-rw-r--r--gcc/ada/sem_aggr.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/sem_aggr.adb b/gcc/ada/sem_aggr.adb
index 9b5efbccd42..d50942b024a 100644
--- a/gcc/ada/sem_aggr.adb
+++ b/gcc/ada/sem_aggr.adb
@@ -3156,7 +3156,11 @@ package body Sem_Aggr is
end loop;
else
- Record_Def := Type_Definition (Parent (Base_Type (Typ)));
+ -- We take the underlying type to account for private types when
+ -- the original association had a box default.
+
+ Record_Def :=
+ Type_Definition (Parent (Underlying_Type (Base_Type (Typ))));
if Null_Present (Record_Def) then
null;
OpenPOWER on IntegriCloud