Message ID | 20200706113855.GA135551@adacore.com |
---|---|
State | New |
Headers | show |
Series | [Ada] Fix evaluation of Enum_Rep applied to imported constant | expand |
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb --- 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