aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-12-05 03:20:42 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-05 03:25:22 +0100
commitb7a72ac6b84fca5fdd84a0656b87ad25a643c1f0 (patch)
tree64b222be87526276a26c91c5d1f8a4ce0d885aa4 /testsuite
parentfc13e0f6103a0da2ee4215036baa77acc2c2d589 (diff)
downloadghdl-b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0.tar.gz
ghdl-b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0.tar.bz2
ghdl-b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0.zip
Add testcase for #151
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue151/tb.vhdl19
-rwxr-xr-xtestsuite/gna/issue151/testsuite.sh8
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/gna/issue151/tb.vhdl b/testsuite/gna/issue151/tb.vhdl
new file mode 100644
index 000000000..8aadd3f4b
--- /dev/null
+++ b/testsuite/gna/issue151/tb.vhdl
@@ -0,0 +1,19 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity test is
+ port (in_vec : in std_logic_vector);
+end entity;
+
+architecture rtl of test is
+signal A : natural;
+begin
+
+ gen2 : if in_vec'length <= 2 generate
+ A <= 2;
+ end generate;
+ gen3 : if in_vec'length > 2 generate
+ A <= 3;
+ end generate;
+end architecture;
diff --git a/testsuite/gna/issue151/testsuite.sh b/testsuite/gna/issue151/testsuite.sh
new file mode 100755
index 000000000..a77ea351b
--- /dev/null
+++ b/testsuite/gna/issue151/testsuite.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze tb.vhdl
+clean
+
+echo "Test successful"