Landing: 8de3904457c3
Project / Subsystem
gcc / ada
Date
2026-01-07
Author
Bob Duff
Commit
8de3904457c3786d7b6e36a728289cf57ca3dbb3
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ada
- patch_id
- —
- commit_hash
- 8de3904457c3786d7b6e36a728289cf57ca3dbb3
- source_type
- github
- headline
- Fix crash when using pragma Ignore_Pragma in SPARK mode.
- tldr
- The compiler no longer crashes when using `pragma Ignore_Pragma` in SPARK mode due to improved handling of protected bodies.
- author
- Bob Duff
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • ada
- • SPARK
- • pragma
- • bugfix
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-01-07T00:00:00.000Z
This commit fixes a bug in the expansion of protected bodies that caused a crash when using pragma Ignore_Pragma in SPARK mode. The fix consolidates the cases that copy Op_Body, which is usually a protected subprogram declaration or body, and removes the unnecessary raise Program_Error. This change makes the code more robust and DRY, preventing the crash and improving the handling of protected bodies in SPARK mode.