Landing: d9849cc34ab5

Project / Subsystem

gcc / ada

Date

2026-01-20

Author

Eric Botcazou

Commit

d9849cc34ab53a8f895a6bae04e1215504df46f7

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
ada
patch_id
commit_hash
d9849cc34ab53a8f895a6bae04e1215504df46f7
source_type
github
headline
Ada Fixes Crash on Declare Expression in Contract on Access to Subprogram Type.
tldr
The Ada compiler no longer crashes when using a declare expression in a contract on access to a subprogram type.
author
Eric Botcazou
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • ada
  • bugfix
  • compiler
discussion_id_link
bugzilla_pr
date
2026-01-20T00:00:00.000Z

The Ada compiler previously crashed when a declare expression was used in a contract applied to an access-to-subprogram type. This commit fixes the crash by adding the missing Scope_Depth_Value field to the E_Subprogram_Type enumeration in gen_il-gen-gen_entities.adb. This field is required for proper scope management.