aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-decls.adb
diff options
context:
space:
mode:
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;