diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-03-11 07:05:14 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-03-11 07:05:43 +0100 |
commit | d3457b9db47199d65b3d038f671c82d660631135 (patch) | |
tree | 90a58010ac2a1be58a582af7b644ddcff1edabb6 /testsuite | |
parent | 59aa09ddc0cfa5b4d5aefb649c2350519e80afaf (diff) | |
download | ghdl-d3457b9db47199d65b3d038f671c82d660631135.tar.gz ghdl-d3457b9db47199d65b3d038f671c82d660631135.tar.bz2 ghdl-d3457b9db47199d65b3d038f671c82d660631135.zip |
Add testcase for #310
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue310/b.vhdl | 4 | ||||
-rw-r--r-- | testsuite/gna/issue310/bb.vhdl | 2 | ||||
-rw-r--r-- | testsuite/gna/issue310/bbb.vhdl | 18 | ||||
-rwxr-xr-x | testsuite/gna/issue310/testsuite.sh | 13 |
4 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/gna/issue310/b.vhdl b/testsuite/gna/issue310/b.vhdl new file mode 100644 index 000000000..a21cd4676 --- /dev/null +++ b/testsuite/gna/issue310/b.vhdl @@ -0,0 +1,4 @@ +package b is + generic ( X: natural := 4); + type m is array (natural range <>) of bit_vector (X - 1 downto 0); +end package; diff --git a/testsuite/gna/issue310/bb.vhdl b/testsuite/gna/issue310/bb.vhdl new file mode 100644 index 000000000..4f8e87d0e --- /dev/null +++ b/testsuite/gna/issue310/bb.vhdl @@ -0,0 +1,2 @@ +package bb is new work.b generic map ( X => 6); + diff --git a/testsuite/gna/issue310/bbb.vhdl b/testsuite/gna/issue310/bbb.vhdl new file mode 100644 index 000000000..b2ef9a1b4 --- /dev/null +++ b/testsuite/gna/issue310/bbb.vhdl @@ -0,0 +1,18 @@ +-- package bb is new work.b generic map ( X => 6); + +use work.bb.all; + +entity bbb is +end entity; + +architecture a of bbb is + +begin + process + variable n: m (0 to 0); + begin + report "X = " & integer'image(X); + report "m'left = " & integer'image(n(0)'left); + wait; + end process; +end architecture; diff --git a/testsuite/gna/issue310/testsuite.sh b/testsuite/gna/issue310/testsuite.sh new file mode 100755 index 000000000..15ce43718 --- /dev/null +++ b/testsuite/gna/issue310/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze b.vhdl +analyze bb.vhdl +analyze bbb.vhdl +elab_simulate bbb + +clean + +echo "Test successful" |