Landing: 78cfbf9df7a3
Project / Subsystem
gcc / ada
Date
2026-05-10
Author
Eric Botcazou
Commit
78cfbf9df7a3aa5d78dd1ac95222691f7e448e34
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- ada
- patch_id
- —
- commit_hash
- 78cfbf9df7a3aa5d78dd1ac95222691f7e448e34
- source_type
- github
- headline
- Ada: Fixes Image attribute for derived enumeration types.
- tldr
- The Ada compiler now correctly handles the Image attribute for derived enumeration types with representation clauses.
- author
- Eric Botcazou
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • ada
- • enumeration
- • representation clause
- • image attribute
- discussion_id_link
- —
- bugzilla_pr
- —
- date
- 2026-05-10T00:00:00.000Z
The Ada compiler was incorrectly fetching the root type when handling the Image attribute for derived enumeration types, bypassing representation clauses defined on the derived type itself. This commit ensures that the compiler respects representation clauses on derived enumeration types when generating the Image attribute, by sticking to base types. A new test case, gnat.dg/enum6.adb, validates the fix.