aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-10-10 18:21:01 +0200
committerTristan Gingold <tgingold@free.fr>2022-10-10 18:21:01 +0200
commit5f1cfe42cf2aeea6250c4575daeff42cea4c02dc (patch)
treedbef434348187d6cce2c3157a3dde37b7277ee92 /src/synth
parentf2c863f7e030796cb325885654ffe3e945f35198 (diff)
downloadghdl-5f1cfe42cf2aeea6250c4575daeff42cea4c02dc.tar.gz
ghdl-5f1cfe42cf2aeea6250c4575daeff42cea4c02dc.tar.bz2
ghdl-5f1cfe42cf2aeea6250c4575daeff42cea4c02dc.zip
synth: fix crashes on scalar attribute with anonymous subtype.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-vhdl_expr.adb4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/synth/synth-vhdl_expr.adb b/src/synth/synth-vhdl_expr.adb
index c2d8f9eb8..33e5ab8ce 100644
--- a/src/synth/synth-vhdl_expr.adb
+++ b/src/synth/synth-vhdl_expr.adb
@@ -1538,7 +1538,7 @@ package body Synth.Vhdl_Expr is
Val : Valtyp;
Res : Valtyp;
begin
- Val := Synth_Expression (Syn_Inst, Param);
+ Val := Synth_Expression_With_Type (Syn_Inst, Param, Dtype);
if Is_Static (Val.Val) then
declare
T : Int64;
@@ -2314,8 +2314,8 @@ package body Synth.Vhdl_Expr is
V : Valtyp;
Dtype : Type_Acc;
begin
- V := Synth_Expression (Syn_Inst, Param);
Dtype := Get_Subtype_Object (Syn_Inst, Get_Type (Expr));
+ V := Synth_Expression_With_Type (Syn_Inst, Param, Dtype);
-- FIXME: to be generalized. Not always as simple as a
-- subtype conversion.
if Is_Static (V.Val) then