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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>:

https://gcc.gnu.org/g:bd55fa102715c7442c050b193dadfdb5337e2377

commit r12-3522-gbd55fa102715c7442c050b193dadfdb5337e2377
Author: Eric Botcazou <ebotca...@adacore.com>
Date:   Tue Sep 14 11:33:05 2021 +0200

    Fix PR ada/101970

    This is a regression present on the mainline and 11 branch in the form of
an
    ICE for an enumeration type with a full signed representation for its size.

    gcc/ada/
            PR ada/101970
            * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Enum_Rep>:
            Use an unchecked conversion instead of a regular conversion in the
            enumeration case and remove Conversion_OK flag in the integer case.
            <Attribute_Pos>: Remove superfluous test.

    gcc/testsuite/
            * gnat.dg/enum_rep2.adb: New test.

Reply via email to