diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-04-23 08:58:30 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-04-23 08:58:30 +0200 |
commit | 2d34c88b80275b5812ac62a3bf83354c41494265 (patch) | |
tree | 18998bf986c535623f03a0719a183ae3a859af8d | |
parent | 23744bad75edd84f9f4e20a9c29a96a85ee4b810 (diff) | |
download | ghdl-2d34c88b80275b5812ac62a3bf83354c41494265.tar.gz ghdl-2d34c88b80275b5812ac62a3bf83354c41494265.tar.bz2 ghdl-2d34c88b80275b5812ac62a3bf83354c41494265.zip |
testsuite/gna: add a test for #2421
-rwxr-xr-x | testsuite/gna/issue2421/testsuite.sh | 19 | ||||
-rw-r--r-- | testsuite/gna/issue2421/top.vhdl | 31 |
2 files changed, 50 insertions, 0 deletions
diff --git a/testsuite/gna/issue2421/testsuite.sh b/testsuite/gna/issue2421/testsuite.sh new file mode 100755 index 000000000..c6f7f1765 --- /dev/null +++ b/testsuite/gna/issue2421/testsuite.sh @@ -0,0 +1,19 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze_failure --std=93 top.vhdl +analyze_failure --std=08 top.vhdl + +analyze top.vhdl +elab_simulate top + +clean + +GHDL_STD_FLAGS="--std=08 -frelaxed" +analyze top.vhdl +elab_simulate top + +clean + +echo "Test successful" diff --git a/testsuite/gna/issue2421/top.vhdl b/testsuite/gna/issue2421/top.vhdl new file mode 100644 index 000000000..676e57efd --- /dev/null +++ b/testsuite/gna/issue2421/top.vhdl @@ -0,0 +1,31 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity comp is + port ( + output : out std_logic_vector + ); +end entity; + +architecture a1 of comp is +begin + output <= (others => '0'); + -- output <= (output'range => '0'); -- gives no error +end architecture; + + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity top is +end entity; + +architecture a2 of top is + signal sig : std_logic_vector(7 downto 0); +begin + inst : entity work.comp + port map ( + output => sig + ); +end architecture; |