https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101970
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The releases/gcc-11 branch has been updated by Eric Botcazou <ebotca...@gcc.gnu.org>: https://gcc.gnu.org/g:40c0122a1c5c364346d2d1c96dce66aea2e5032c commit r11-8991-g40c0122a1c5c364346d2d1c96dce66aea2e5032c 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.