https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125240

            Bug ID: 125240
           Summary: Image attribute fails for derived enumeration type
                    with reprepresentaion clause
           Product: gcc
           Version: 16.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Keith.S.Thompson at gmail dot com
                CC: dkm at gcc dot gnu.org
  Target Milestone: ---

Created attachment 64401
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=64401&action=edit
Test case enum_bug.adb

I see this problem on Ubuntu 24.04.4 with gcc 13.3.0 (installed by
package manager) and gcc 16.1.0 (built from source).

For an enumeration type with or without an enumeration representation clause,
the 'Image attribute works correctly.

For a derived enumeration type with a representation clause, derived from
an enumeration type without a representation clause, the 'Image attribute
returns garbage.

Let me emphasize that this bug does not affect me. I found it while
playing around with enumeration representation clauses, not in any
production code. Feel free to prioritize based on that.

Test case and output attached. I've filtered the output through
"cat -v", since can include nasty things like null characters.

Reply via email to