aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1179
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-04-01 08:20:01 +0200
committerTristan Gingold <tgingold@free.fr>2020-04-01 08:20:01 +0200
commit2c66a8bd567a50f4eb2e4bb3d35e9e3dd1e10ff5 (patch)
tree39f83ddfce1ad363a13ab327b8d1ea8a72b7753a /testsuite/synth/issue1179
parent02efa5de54ddd02dfa03c644c49d8fffba5960bb (diff)
downloadghdl-2c66a8bd567a50f4eb2e4bb3d35e9e3dd1e10ff5.tar.gz
ghdl-2c66a8bd567a50f4eb2e4bb3d35e9e3dd1e10ff5.tar.bz2
ghdl-2c66a8bd567a50f4eb2e4bb3d35e9e3dd1e10ff5.zip
testsuite/synth: add a test for #1179
Diffstat (limited to 'testsuite/synth/issue1179')
-rw-r--r--testsuite/synth/issue1179/bug.vhdl18
-rwxr-xr-xtestsuite/synth/issue1179/testsuite.sh8
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/synth/issue1179/bug.vhdl b/testsuite/synth/issue1179/bug.vhdl
new file mode 100644
index 000000000..a4271b91f
--- /dev/null
+++ b/testsuite/synth/issue1179/bug.vhdl
@@ -0,0 +1,18 @@
+library IEEE;
+use IEEE.std_logic_1164.all;
+use IEEE.numeric_std.all;
+
+entity bug is
+ port(
+ dummy : out positive
+ );
+end bug;
+
+architecture behav of bug is
+ constant A : positive := 4;
+ constant B : positive := 1100;
+ constant C : positive := to_integer(A * to_unsigned(B, 11));
+begin
+ dummy <= c;
+
+end architecture;
diff --git a/testsuite/synth/issue1179/testsuite.sh b/testsuite/synth/issue1179/testsuite.sh
new file mode 100755
index 000000000..121ca9a6a
--- /dev/null
+++ b/testsuite/synth/issue1179/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_analyze bug
+clean
+
+echo "Test successful"