aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1160
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-03-18 07:33:44 +0100
committerTristan Gingold <tgingold@free.fr>2020-03-18 07:33:44 +0100
commit2d50c68e91dcaafabb52d02afd43e001955b6b03 (patch)
treebab543756121eaf172b3725d821c9334c455d07b /testsuite/synth/issue1160
parent3939ce510a2eaa7f612078369a9032e12981efb1 (diff)
downloadghdl-2d50c68e91dcaafabb52d02afd43e001955b6b03.tar.gz
ghdl-2d50c68e91dcaafabb52d02afd43e001955b6b03.tar.bz2
ghdl-2d50c68e91dcaafabb52d02afd43e001955b6b03.zip
testsuite/synth: add a test for #1160
Diffstat (limited to 'testsuite/synth/issue1160')
-rw-r--r--testsuite/synth/issue1160/issue.vhdl14
-rwxr-xr-xtestsuite/synth/issue1160/testsuite.sh8
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/synth/issue1160/issue.vhdl b/testsuite/synth/issue1160/issue.vhdl
new file mode 100644
index 000000000..36f2890ba
--- /dev/null
+++ b/testsuite/synth/issue1160/issue.vhdl
@@ -0,0 +1,14 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity issue is
+ generic (N : natural := 3);
+ port (data : out signed(N-1 downto 0));
+end issue;
+
+architecture rtl of issue is
+ subtype my_type is signed(N-1 downto 0);
+begin
+ data <= to_signed(1,my_type'length);
+end architecture;
diff --git a/testsuite/synth/issue1160/testsuite.sh b/testsuite/synth/issue1160/testsuite.sh
new file mode 100755
index 000000000..30f40648a
--- /dev/null
+++ b/testsuite/synth/issue1160/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+synth_analyze issue
+clean
+
+echo "Test successful"