aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1665
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-02-27 17:20:56 +0100
committerTristan Gingold <tgingold@free.fr>2021-02-27 17:20:56 +0100
commitf5e3ef10265440a3efc95281fef295cba6aab8a9 (patch)
treefcc8d17b898ae1a2ab92c147f9fddb66414fbe66 /testsuite/synth/issue1665
parente01d0227af0092db12a6e08f3b8278d860b37416 (diff)
downloadghdl-f5e3ef10265440a3efc95281fef295cba6aab8a9.tar.gz
ghdl-f5e3ef10265440a3efc95281fef295cba6aab8a9.tar.bz2
ghdl-f5e3ef10265440a3efc95281fef295cba6aab8a9.zip
testsuite/synth: add a test for #1665
Diffstat (limited to 'testsuite/synth/issue1665')
-rw-r--r--testsuite/synth/issue1665/test.vhdl16
-rwxr-xr-xtestsuite/synth/issue1665/testsuite.sh8
2 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/synth/issue1665/test.vhdl b/testsuite/synth/issue1665/test.vhdl
new file mode 100644
index 000000000..3591e23c7
--- /dev/null
+++ b/testsuite/synth/issue1665/test.vhdl
@@ -0,0 +1,16 @@
+library ieee;
+use ieee.fixed_pkg.all;
+use ieee.math_real.all;
+
+entity test is
+end entity test;
+
+architecture synthesis of test is
+ constant test1 : real := (2.0**6); -- works
+ constant test2 : real := (2.0**6.0); -- unhandled predefined IEEE operator "**"
+ constant test3 : real := arctan(2.0); -- unhandled call to ieee function "arctan"
+ signal a : sfixed(7 downto 0);
+begin
+a <= to_sfixed(test2, a);
+ assert test2 = 64.0 severity failure;
+end architecture synthesis;
diff --git a/testsuite/synth/issue1665/testsuite.sh b/testsuite/synth/issue1665/testsuite.sh
new file mode 100755
index 000000000..1bd00c114
--- /dev/null
+++ b/testsuite/synth/issue1665/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+synth_only test
+
+echo "Test successful"