GCC Newspaper
JUNE 15, 2026
Date
/
Architectures
Components
Topics
News & Policy
Other
ada

Ada: Fix assertion failure for improper aggregate operation.

The Ada compiler no longer crashes when encountering an improper aggregate operation.

The Ada compiler could trigger an assertion failure when dealing with improper aggregate operations. This commit fixes this bug by adding a check to ensure that the compiler only accesses the Entity of a node when it is valid to do so. This prevents a compiler crash and makes the Ada compiler more robust.

In Details

The crash was triggered in sem_ch13.adb within Resolve_Aspect_Aggregate.Resolve_Operation because the code was unconditionally accessing the Entity of a node. The fix adds a guard to check for the presence of the Entity before attempting to access it.

For Context

In Ada, an aggregate operation is used to create or manipulate composite data structures like arrays or records. This commit fixes a bug in the Ada compiler that could cause it to crash when handling incorrect aggregate operations. The fix ensures that the compiler only tries to access valid data during aggregate operations, preventing the crash and improving compiler stability.

Filed Under: adaaggregatesbugfixcompiler crash