aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_expr.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-02 19:40:29 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-03 16:47:26 +0100
commit7120d74eec8a8d64f06253eec2763aec4f44ac6c (patch)
tree29a1123208f4205148a50187c0471b684f7e0a09 /src/synth/elab-vhdl_expr.adb
parent5fbe7eadaeb56ca29553c0cf6564a2151da5b423 (diff)
downloadghdl-7120d74eec8a8d64f06253eec2763aec4f44ac6c.tar.gz
ghdl-7120d74eec8a8d64f06253eec2763aec4f44ac6c.tar.bz2
ghdl-7120d74eec8a8d64f06253eec2763aec4f44ac6c.zip
synth: adjust exec_name_subtype for function calls
Diffstat (limited to 'src/synth/elab-vhdl_expr.adb')
-rw-r--r--src/synth/elab-vhdl_expr.adb7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/synth/elab-vhdl_expr.adb b/src/synth/elab-vhdl_expr.adb
index 34b3fe621..1119f6ae9 100644
--- a/src/synth/elab-vhdl_expr.adb
+++ b/src/synth/elab-vhdl_expr.adb
@@ -374,8 +374,15 @@ package body Elab.Vhdl_Expr is
end;
when Iir_Kind_Function_Call =>
declare
+ Ret_Typ : Type_Acc;
Val : Valtyp;
begin
+ Ret_Typ := Get_Subtype_Object (Syn_Inst, Get_Type (Name));
+ if Is_Bounded_Type (Ret_Typ) then
+ return Ret_Typ;
+ end if;
+
+ -- Humm, is it an error ?
Val := Synth.Vhdl_Expr.Synth_Expression (Syn_Inst, Name);
return Val.Typ;
end;