From f6652114c78edfdded7231f16d0b97e1459f738a Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 24 Aug 2020 21:01:15 +0200 Subject: testsuite/gna: add a test for #1429 --- testsuite/gna/issue1429/test.vhdl | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 testsuite/gna/issue1429/test.vhdl (limited to 'testsuite/gna/issue1429/test.vhdl') diff --git a/testsuite/gna/issue1429/test.vhdl b/testsuite/gna/issue1429/test.vhdl new file mode 100644 index 000000000..7c979c349 --- /dev/null +++ b/testsuite/gna/issue1429/test.vhdl @@ -0,0 +1,37 @@ +use std.textio.all; + +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is +end entity; + +architecture a of test is + constant SUB_v : bit_vector(63 downto 0) := (others => '1'); + constant I0 : bit_vector(63 downto 0) := X"AAAAAAAAAAAAAAAA"; + constant I0a : bit_vector(63 downto 0) := I0 xor X"FFFFFFFFFFFFFFFF"; + constant I0b : bit_vector(63 downto 0) := I0 xor SUB_v; + + impure function I0f return bit_vector is + variable ret : bit_vector(63 downto 0); + begin + ret := X"AAAAAAAAAAAAAAAA"; + ret := ret xor SUB_v; + return ret; + end function; + + constant I0c : bit_vector(63 downto 0) := I0f; +begin + process is + variable la, lb, lc : line; + begin + hwrite(la, I0a); + report la.all; + hwrite(lc, I0c); + report lc.all; + assert I0a = I0c severity failure; + assert I0b = I0c severity failure; + wait; + end process; +end architecture a; -- cgit v1.2.3