https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62230
Bug ID: 62230 Summary: Legal program rejected, RM 4.3.2(3, 5/3), ancestor_part can not be expression against error message by compiler itself Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: demoonlit at panathenaia dot halfmoon.jp Created attachment 33380 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33380&action=edit minimal bug triggering source code GNAT rejects any expressions implying aggregate for ancestor_part. For example: (Please see the attachment file, also) type T1 is limited new Ada.Finalization.Limited_Controlled with null record; type T2 is new T1 with null record; X : T2 := (T1 with null record); -- OK Z : T2 := (T1'(Ada.Finalization.Limited_Controlled with null record) with null record); -- ERROR GNAT outputs: main.adb:23:09: limited ancestor part must be aggregate or function call It seems for me that aggregate expression is allowed into ancestor_part according to the error message outputted by GNAT itself. But, it is not. And, RM 4.3.2(3, 5/3) allows it explicitly.