projects
/
gcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f892a9
)
[Ada] Fix evaluation of Enum_Rep applied to imported constant
author
Piotr Trojanek
<trojanek@adacore.com>
Thu, 7 May 2020 12:08:07 +0000
(14:08 +0200)
committer
Pierre-Marie de Rodat
<derodat@adacore.com>
Mon, 6 Jul 2020 11:35:06 +0000
(07:35 -0400)
gcc/ada/
* sem_attr.adb (Eval_Attribute): Check if constant has an
initialization expression.
gcc/ada/sem_attr.adb
patch
|
blob
|
history
diff --git
a/gcc/ada/sem_attr.adb
b/gcc/ada/sem_attr.adb
index 4f112065abeddbba96e94694296de8382e816b3f..5e61810fbf953b5d6a06d0234df78210bdbd68cb 100644
(file)
--- 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