aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-01-10 21:48:23 +0100
committerTristan Gingold <tgingold@free.fr>2015-01-10 21:48:23 +0100
commit5f674701bcfe000eb9795c6d4704c2c56ceeb06c (patch)
tree5033b9f11467aa06c4881325c736aa00453dc0a3 /testsuite
parentdcf9335a06eb78c5d977945f713f326e6288ae9a (diff)
downloadghdl-5f674701bcfe000eb9795c6d4704c2c56ceeb06c.tar.gz
ghdl-5f674701bcfe000eb9795c6d4704c2c56ceeb06c.tar.bz2
ghdl-5f674701bcfe000eb9795c6d4704c2c56ceeb06c.zip
Add minimal example for bug23165
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/bug23165/mwe2/mwe.vhd38
-rwxr-xr-xtestsuite/gna/bug23165/testsuite.sh3
2 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/gna/bug23165/mwe2/mwe.vhd b/testsuite/gna/bug23165/mwe2/mwe.vhd
new file mode 100644
index 000000000..40b5cd7b3
--- /dev/null
+++ b/testsuite/gna/bug23165/mwe2/mwe.vhd
@@ -0,0 +1,38 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity mwe is
+end mwe;
+
+architecture lulz of mwe is
+type sig_t is array (0 to 1) of std_logic_vector(1 downto 0);
+signal sigw : sig_t := (others => (others => '0'));
+signal sigf : sig_t := (others => (others => '0'));
+signal clk : std_logic := '0';
+
+begin
+ clk <= not clk after 50 ns;
+
+ sigw(0) <= (others => '1');
+ sigf(0) <= (others => '1');
+
+ fail : process
+ variable i : integer range 0 to 0 := 0;
+ variable j : integer range 1 to 1 := 1;
+ begin
+ wait until rising_edge(clk);
+ sigf(j) <= sigf(i);
+ end process;
+
+ work : process
+ begin
+ wait until rising_edge(clk);
+ sigw(1) <= sigw(0);
+ end process;
+
+ process (sigf)
+ begin
+ report "sigf(1) = " & std_logic'image (sigf (0)(1));
+ assert now = 0 ns or sigf (0) = "XX" severity failure;
+ end process;
+end lulz;
diff --git a/testsuite/gna/bug23165/testsuite.sh b/testsuite/gna/bug23165/testsuite.sh
index a8251ed8c..66e03f0c6 100755
--- a/testsuite/gna/bug23165/testsuite.sh
+++ b/testsuite/gna/bug23165/testsuite.sh
@@ -10,6 +10,9 @@ analyze mwe_working/counter.vhd
analyze mwe_working/mwe.vhd
elab_simulate mwe --stop-time=100us --wave=output.ghw
+analyze mwe2/mwe.vhd
+elab_simulate mwe --stop-time=100us
+
clean
echo "Test successful"