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

Fixes Compiler Crash with Expression Functions

A compiler crash has been fixed when using expression functions in Ada.

A bug causing the Ada compiler to crash when using primitive functions completed by expression functions has been resolved. The fix restricts the bypass for freezing the profile in Analyze_Subprogram_Body_Helper to only apply to wrapper functions.

In Details

This commit addresses PR ada/93702. The issue involved incorrect handling of expression functions within exp_ch3.adb and sem_ch6.adb, leading to a compiler crash. The fix ensures that the Was_Expression_Function flag is not incorrectly set, preventing premature freezing of the profile in Analyze_Subprogram_Body_Helper except for wrapper functions.

For Context

Sometimes, compilers can have bugs that cause them to crash (stop working unexpectedly) when compiling certain code. This commit fixes one such bug in the Ada compiler that occurred when using a specific type of function called an "expression function". Now, the compiler will correctly compile this type of code without crashing.

Filed Under: adabugfixcrash