This adds a more robust guard to Resolve_Record_Aggregate.
gcc/ada/
PR ada/123088
* sem_aggr.adb (Resolve_Record_Aggregate): Add more robust guard.
-- Typ is not a derived tagged type
- else
+ elsif Nkind (Parent (Base_Type (Typ))) = N_Full_Type_Declaration then
Record_Def := Type_Definition (Parent (Base_Type (Typ)));
- if No (Record_Def) or else Null_Present (Record_Def) then
+ if Null_Present (Record_Def) then
null;
-- Explicitly add here mutably class-wide types because they do