From: Bob Duff Date: Thu, 18 Jun 2020 13:10:33 +0000 (-0400) Subject: [Ada] Bug in Enum_Subtype'Image in Ada 2020 mode X-Git-Tag: basepoints/gcc-12~5902 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=116e8b669eddc96b0294c6cf114372a0d346072e;p=thirdparty%2Fgcc.git [Ada] Bug in Enum_Subtype'Image in Ada 2020 mode gcc/ada/ * exp_imgv.adb (Expand_Image_Attribute): Add Root_Type, so constrained subtypes work. --- diff --git a/gcc/ada/exp_imgv.adb b/gcc/ada/exp_imgv.adb index 8cad1020a4fe..41e4b1b454e7 100644 --- a/gcc/ada/exp_imgv.adb +++ b/gcc/ada/exp_imgv.adb @@ -483,7 +483,7 @@ package body Exp_Imgv is -- underlying type. if Ada_Version >= Ada_2020 then - Rtyp := Underlying_Type (Ptyp); + Rtyp := Underlying_Type (Root_Type (Ptyp)); else Rtyp := Root_Type (Ptyp); end if;