diff options
author | Piotr Trojanek <trojanek@adacore.com> | 2020-05-07 14:08:07 +0200 |
---|---|---|
committer | Pierre-Marie de Rodat <derodat@adacore.com> | 2020-07-06 07:35:06 -0400 |
commit | f0e6256fd399418047772ebc72d2025938f7ccd8 (patch) | |
tree | 43f84eefdbefac76cdfea12bd8773d57ead67909 /gcc | |
parent | 8f892a98cc4599b7562e041a53ecfa920c72551c (diff) | |
download | gcc-f0e6256fd399418047772ebc72d2025938f7ccd8.zip gcc-f0e6256fd399418047772ebc72d2025938f7ccd8.tar.gz gcc-f0e6256fd399418047772ebc72d2025938f7ccd8.tar.bz2 |
[Ada] Fix evaluation of Enum_Rep applied to imported constant
gcc/ada/
* sem_attr.adb (Eval_Attribute): Check if constant has an
initialization expression.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ada/sem_attr.adb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/ada/sem_attr.adb b/gcc/ada/sem_attr.adb index 4f11206..5e61810 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 |