diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-04-01 20:39:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-04-02 13:06:11 +0200 |
commit | c33f41e4612347d1fcbb9a37bc82249d7b8366eb (patch) | |
tree | 716df9c5631b1107b92480f1a7c5a43b049d2673 /testsuite/gna/issue1704/repro3.vhdl | |
parent | 1c17875a1430046d19f91946dd5689fc5db43b84 (diff) | |
download | ghdl-c33f41e4612347d1fcbb9a37bc82249d7b8366eb.tar.gz ghdl-c33f41e4612347d1fcbb9a37bc82249d7b8366eb.tar.bz2 ghdl-c33f41e4612347d1fcbb9a37bc82249d7b8366eb.zip |
testsuite/gna: add a testcase for #1704
Diffstat (limited to 'testsuite/gna/issue1704/repro3.vhdl')
-rw-r--r-- | testsuite/gna/issue1704/repro3.vhdl | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/gna/issue1704/repro3.vhdl b/testsuite/gna/issue1704/repro3.vhdl new file mode 100644 index 000000000..3a2052911 --- /dev/null +++ b/testsuite/gna/issue1704/repro3.vhdl @@ -0,0 +1,24 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity repro3 is + generic ( + word_len : natural := 20); +end; + +architecture behav of repro3 is + subtype word is std_logic_vector(word_len - 1 downto 0); + + function F return word is + begin + return ("1010","101010101010", others => '0'); + end function; +begin + assert f = b"1010_101010101010_0000" severity failure; + process + begin + report to_string(f); + wait; + end process; +end; + |