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