aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-26 17:04:33 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-26 17:04:33 +0100
commitf11a4cf6ccb7d26fe8fba0f2d1e9d411e3f37a43 (patch)
treec799de386a2d84c71615238246718e03bdeb7785 /src/synth
parent060d785216fd7006482608473341354ade78f8b9 (diff)
downloadghdl-f11a4cf6ccb7d26fe8fba0f2d1e9d411e3f37a43.tar.gz
ghdl-f11a4cf6ccb7d26fe8fba0f2d1e9d411e3f37a43.tar.bz2
ghdl-f11a4cf6ccb7d26fe8fba0f2d1e9d411e3f37a43.zip
synth: convert subtype on return. Fix #1116
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-stmts.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/synth/synth-stmts.adb b/src/synth/synth-stmts.adb
index 7b8a9434f..fbca6e852 100644
--- a/src/synth/synth-stmts.adb
+++ b/src/synth/synth-stmts.adb
@@ -2253,7 +2253,7 @@ package body Synth.Stmts is
if Expr /= Null_Node then
-- Return in function.
Val := Synth_Expression_With_Type (C.Inst, Expr, C.Ret_Typ);
- Val := Synth_Subtype_Conversion (Val, C.Ret_Typ, False, Stmt);
+ Val := Synth_Subtype_Conversion (Val, C.Ret_Typ, True, Stmt);
if C.Nbr_Ret = 0 then
C.Ret_Value := Val;