diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-06-30 06:32:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-06-30 06:32:33 +0200 |
commit | cf857435d6d3db7b6beec07b1b73bf38719965e4 (patch) | |
tree | 01d7f9af5d468ab6de3390bfff952e3d4a29eead | |
parent | 21b710f2ee2a1e85ed0f33f93e95230fd1584412 (diff) | |
download | ghdl-cf857435d6d3db7b6beec07b1b73bf38719965e4.tar.gz ghdl-cf857435d6d3db7b6beec07b1b73bf38719965e4.tar.bz2 ghdl-cf857435d6d3db7b6beec07b1b73bf38719965e4.zip |
Add testcase for previous patch.
-rw-r--r-- | testsuite/gna/bug075/dff.vhdl | 48 | ||||
-rwxr-xr-x | testsuite/gna/bug075/testsuite.sh | 10 |
2 files changed, 58 insertions, 0 deletions
diff --git a/testsuite/gna/bug075/dff.vhdl b/testsuite/gna/bug075/dff.vhdl new file mode 100644 index 000000000..d0eb81371 --- /dev/null +++ b/testsuite/gna/bug075/dff.vhdl @@ -0,0 +1,48 @@ + +library ieee; +use ieee.std_logic_1164.all; + +entity dff is + port ( + d, clk: in std_logic; + q: out std_logic + ); +end entity dff; + +architecture behave of dff is +begin + process (clk) + begin + if clk = '1' then + q <= d; + end if; + end process; +end architecture behave; + +library ieee; +use ieee.std_logic_1164.all; + +entity dff is +end entity dff; + +architecture behave of dff is + component dff is + port ( + d, clk: in std_logic; + q: out std_logic + ); + end component; + signal d_in: std_logic; + signal clk_in: std_logic; + signal q_out: std_logic; +begin +d_ff: + dff port map ( d_in, clk_in, q_out); +no_label: + process + begin + if clk_in = '1' then + q_out <= d_in; + end if; + end process; +end architecture behave; diff --git a/testsuite/gna/bug075/testsuite.sh b/testsuite/gna/bug075/testsuite.sh new file mode 100755 index 000000000..846488cae --- /dev/null +++ b/testsuite/gna/bug075/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +analyze -Wno-library dff.vhdl +elab_failure dff + +clean + +echo "Test successful" |