aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/synth-decls.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-09-26 19:41:59 +0200
committerTristan Gingold <tgingold@free.fr>2019-09-26 19:41:59 +0200
commit3fbe77dabdb4735c0904df4a8e1f77473609d30f (patch)
tree470e0c8779cc8fc6f571aeaf025e9e10f471bb33 /src/synth/synth-decls.adb
parentd8a3d241468d0a91b05d4277d06b87dbf67f5384 (diff)
downloadghdl-3fbe77dabdb4735c0904df4a8e1f77473609d30f.tar.gz
ghdl-3fbe77dabdb4735c0904df4a8e1f77473609d30f.tar.bz2
ghdl-3fbe77dabdb4735c0904df4a8e1f77473609d30f.zip
synth: do subtype conversion for variable default
Diffstat (limited to 'src/synth/synth-decls.adb')
-rw-r--r--src/synth/synth-decls.adb2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/synth/synth-decls.adb b/src/synth/synth-decls.adb
index 874b9d303..3208a61f9 100644
--- a/src/synth/synth-decls.adb
+++ b/src/synth/synth-decls.adb
@@ -481,6 +481,8 @@ package body Synth.Decls is
if Is_Valid (Def) then
Obj_Type := Get_Value_Type (Syn_Inst, Get_Type (Decl));
Init := Synth_Expression_With_Type (Syn_Inst, Def, Obj_Type);
+ Init := Synth_Subtype_Conversion
+ (Init, Obj_Type, False, Decl);
else
Init := null;
end if;