aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue424
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-04 20:45:05 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-04 20:45:05 +0200
commit845f181d0b66e9d917988566ab9e0e8e9f258d9a (patch)
tree1aa39a42e874219822d5d32b63c9bb370e6d2a86 /testsuite/gna/issue424
parentad0dd0fa656c475c3e195fb7f841f62a1c8cbbc1 (diff)
downloadghdl-845f181d0b66e9d917988566ab9e0e8e9f258d9a.tar.gz
ghdl-845f181d0b66e9d917988566ab9e0e8e9f258d9a.tar.bz2
ghdl-845f181d0b66e9d917988566ab9e0e8e9f258d9a.zip
Add reproducer for #424
Diffstat (limited to 'testsuite/gna/issue424')
-rw-r--r--testsuite/gna/issue424/subBlock.vhd15
-rw-r--r--testsuite/gna/issue424/testCaseCrash.vhd23
-rw-r--r--testsuite/gna/issue424/testCaseGood.vhd23
-rwxr-xr-xtestsuite/gna/issue424/testsuite.sh15
4 files changed, 76 insertions, 0 deletions
diff --git a/testsuite/gna/issue424/subBlock.vhd b/testsuite/gna/issue424/subBlock.vhd
new file mode 100644
index 000000000..4b866abc9
--- /dev/null
+++ b/testsuite/gna/issue424/subBlock.vhd
@@ -0,0 +1,15 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity subBlock is
+ port (outPort : out std_logic;
+ inPort : in std_logic_vector(3 downto 0)
+ );
+end entity subBlock;
+
+architecture behavioral of subBlock is
+
+begin
+ outPort <= inPort(0);
+
+end architecture behavioral;
diff --git a/testsuite/gna/issue424/testCaseCrash.vhd b/testsuite/gna/issue424/testCaseCrash.vhd
new file mode 100644
index 000000000..555d4db7f
--- /dev/null
+++ b/testsuite/gna/issue424/testCaseCrash.vhd
@@ -0,0 +1,23 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity testCaseCrash is
+ port (outPad : out std_logic;
+ inPad : in std_logic
+ );
+end entity testCaseCrash;
+
+architecture behavioral of testCaseCrash is
+ component subBlock is
+ port (outPort : out std_logic;
+ inPort : in std_logic
+ );
+ end component subBlock;
+
+begin
+ xsubBlock : subBlock
+ port map (outPort => outPad,
+ inPort => inPad
+ );
+
+end architecture behavioral;
diff --git a/testsuite/gna/issue424/testCaseGood.vhd b/testsuite/gna/issue424/testCaseGood.vhd
new file mode 100644
index 000000000..ea030acae
--- /dev/null
+++ b/testsuite/gna/issue424/testCaseGood.vhd
@@ -0,0 +1,23 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity testCaseGood is
+ port (outPad : out std_logic;
+ inPad : in std_logic_vector(3 downto 0)
+ );
+end entity testCaseGood;
+
+architecture behavioral of testCaseGood is
+ component subBlock is
+ port (outPort : out std_logic;
+ inPort : in std_logic_vector(3 downto 0)
+ );
+ end component subBlock;
+
+begin
+ xsubBlock : subBlock
+ port map (outPort => outPad,
+ inPort => inPad
+ );
+
+end architecture behavioral;
diff --git a/testsuite/gna/issue424/testsuite.sh b/testsuite/gna/issue424/testsuite.sh
new file mode 100755
index 000000000..81ee72d97
--- /dev/null
+++ b/testsuite/gna/issue424/testsuite.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze subBlock.vhd
+
+analyze testCaseGood.vhd
+elab_simulate testcasegood
+
+analyze testCaseCrash.vhd
+elab_failure testcasecrash
+
+clean
+
+echo "Test successful"