From: Piotr Trojanek Date: Thu, 7 May 2020 12:08:07 +0000 (+0200) Subject: [Ada] Fix evaluation of Enum_Rep applied to imported constant X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f0e6256fd399418047772ebc72d2025938f7ccd8;p=gcc.git [Ada] Fix evaluation of Enum_Rep applied to imported constant gcc/ada/ * sem_attr.adb (Eval_Attribute): Check if constant has an initialization expression. --- diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 4f112065abe..5e61810fbf9 100644 --- a/gcc/ada/sem_attr.adb +++ b/gcc/ada/sem_attr.adb @@ -7834,6 +7834,8 @@ package body Sem_Attr is (Ekind (Entity (Enum_Expr)) = E_Constant and then Nkind (Parent (Entity (Enum_Expr))) = N_Object_Declaration + and then Present + (Expression (Parent (Entity (P)))) and then Compile_Time_Known_Value (Expression (Parent (Entity (P)))))) then