aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-08-26 19:44:19 +0200
committerTristan Gingold <tgingold@free.fr>2020-08-26 22:39:05 +0200
commit89578f1793a01fbeb701cbe13fc5f586e08400d2 (patch)
tree2d52a5bdd353b5485b1a7b71412bcbbb6fd7644c /src/synth
parentf61903dba10aadcb18d608f4c57e21e7d427ea25 (diff)
downloadghdl-89578f1793a01fbeb701cbe13fc5f586e08400d2.tar.gz
ghdl-89578f1793a01fbeb701cbe13fc5f586e08400d2.tar.bz2
ghdl-89578f1793a01fbeb701cbe13fc5f586e08400d2.zip
synth-static_oper: fix crash on exponential. Fix #1442
Allow negative value for the right operand of ** for floating point values.
Diffstat (limited to 'src/synth')
-rw-r--r--src/synth/synth-static_oper.adb2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/synth/synth-static_oper.adb b/src/synth/synth-static_oper.adb
index 2b24d5ec0..7fa3a86fc 100644
--- a/src/synth/synth-static_oper.adb
+++ b/src/synth/synth-static_oper.adb
@@ -288,7 +288,7 @@ package body Synth.Static_Oper is
Res_Typ);
when Iir_Predefined_Floating_Exp =>
return Create_Memory_Fp64
- (Read_Fp64 (Left) ** Natural (Read_Discrete (Right)), Res_Typ);
+ (Read_Fp64 (Left) ** Integer (Read_Discrete (Right)), Res_Typ);
when Iir_Predefined_Array_Array_Concat =>
declare