aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-decls.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-10-20 11:50:14 +0200
committerTristan Gingold <tgingold@free.fr>2019-10-20 11:50:14 +0200
commit56d1edff7fc40f745a47f6860bc2f9860d80052b (patch)
tree4741f3f3dd46f890c60878ab50147892f374bd34 /src/synth/synth-decls.adb
parent663b68d2cc22967352aa43c8135a61c24d8d9503 (diff)
downloadghdl-56d1edff7fc40f745a47f6860bc2f9860d80052b.tar.gz
ghdl-56d1edff7fc40f745a47f6860bc2f9860d80052b.tar.bz2
ghdl-56d1edff7fc40f745a47f6860bc2f9860d80052b.zip
synth: add value_const.
Diffstat (limited to 'src/synth/synth-decls.adb')
-rw-r--r--src/synth/synth-decls.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb
index b7aade231..63661a82e 100644
--- a/src/synth/synth-decls.adb
+++ b/src/synth/synth-decls.adb
@@ -405,6 +405,7 @@ package body Synth.Decls is
First_Decl : Node;
Decl_Type : Node;
Val : Value_Acc;
+ Cst : Value_Acc;
Obj_Type : Type_Acc;
begin
if Deferred_Decl = Null_Node
@@ -438,7 +439,8 @@ package body Synth.Decls is
-- For constant functions, the value must be constant.
pragma Assert (not Get_Instance_Const (Syn_Inst)
or else Is_Const (Val));
- Create_Object_Force (Syn_Inst, First_Decl, Val);
+ Cst := Create_Value_Const (Val, Decl);
+ Create_Object_Force (Syn_Inst, First_Decl, Cst);
end if;
end Synth_Constant_Declaration;