Skip to content

Commit 8e649a5

Browse files
author
Eric Botcazou
committed
Ada: Adjust fix for internal error on illegal aggregate for private type
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.
1 parent 875f1e3 commit 8e649a5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gcc/ada/sem_aggr.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6645,10 +6645,10 @@ package body Sem_Aggr is
66456645

66466646
-- Typ is not a derived tagged type
66476647

6648-
else
6648+
elsif Nkind (Parent (Base_Type (Typ))) = N_Full_Type_Declaration then
66496649
Record_Def := Type_Definition (Parent (Base_Type (Typ)));
66506650

6651-
if No (Record_Def) or else Null_Present (Record_Def) then
6651+
if Null_Present (Record_Def) then
66526652
null;
66536653

66546654
-- Explicitly add here mutably class-wide types because they do

0 commit comments

Comments
 (0)