ada: Crash on function returning empty Ada 2022 aggregate
15 August 2023 at 12:57
ada: Crash on function returning empty Ada 2022 aggregate The compiler crashes processing a function that returns an empty aggregate when its returned type is a record type which defined its container aggregate aspects. gcc/ada/ * exp_aggr.adb (Expand_Container_Aggregate): Report warning on infinite recursion if an empty container aggregate appears in the return statement of its Empty function. Fix typo in comment. * sem_aggr.adb (Resolve_Aggregate): Resolve Ada 2022 empty aggregate that initializes a record type that has defined its container aggregate aspects. (Resolve_Iterated_Association): Protect access to attribute Etype. * sem_ch13.adb (Resolve_Aspect_Aggregate): Fix typo in comment.