diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-12-05 03:20:42 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-12-05 03:25:22 +0100 |
commit | b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0 (patch) | |
tree | 64b222be87526276a26c91c5d1f8a4ce0d885aa4 /testsuite/gna/issue151 | |
parent | fc13e0f6103a0da2ee4215036baa77acc2c2d589 (diff) | |
download | ghdl-b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0.tar.gz ghdl-b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0.tar.bz2 ghdl-b7a72ac6b84fca5fdd84a0656b87ad25a643c1f0.zip |
Add testcase for #151
Diffstat (limited to 'testsuite/gna/issue151')
-rw-r--r-- | testsuite/gna/issue151/tb.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/gna/issue151/testsuite.sh | 8 |
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" |