From 56d1edff7fc40f745a47f6860bc2f9860d80052b Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 20 Oct 2019 11:50:14 +0200 Subject: synth: add value_const. --- src/synth/synth-decls.adb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/synth/synth-decls.adb') 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; -- cgit v1.2.3