aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-07-02 18:46:28 +0200
committerTristan Gingold <tgingold@free.fr>2020-07-02 18:46:28 +0200
commit99c5fecec91d481139a3108dd3e7b53158a002c2 (patch)
treecff3c470981b69253a5c7f71a61fd4fb71dd13e7 /testsuite/gna
parent40038500737a24b00bfe95ddad1057e2bcad4002 (diff)
downloadghdl-99c5fecec91d481139a3108dd3e7b53158a002c2.tar.gz
ghdl-99c5fecec91d481139a3108dd3e7b53158a002c2.tar.bz2
ghdl-99c5fecec91d481139a3108dd3e7b53158a002c2.zip
testsuite/gna: add a test for previous commit.
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue1387/repro5.vhdl10
-rwxr-xr-xtestsuite/gna/issue1387/testsuite.sh2
2 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/gna/issue1387/repro5.vhdl b/testsuite/gna/issue1387/repro5.vhdl
new file mode 100644
index 000000000..6ff80266b
--- /dev/null
+++ b/testsuite/gna/issue1387/repro5.vhdl
@@ -0,0 +1,10 @@
+entity repro5 is
+ port (s : out bit);
+end;
+
+architecture behav of repro5 is
+ constant width : integer := 1;
+ constant zeros : bit_vector(0 to width-1) := (0 to width-1 => '0');
+begin
+ s <= zeros(0);
+end;
diff --git a/testsuite/gna/issue1387/testsuite.sh b/testsuite/gna/issue1387/testsuite.sh
index 74921ddc7..b4b0efcc2 100755
--- a/testsuite/gna/issue1387/testsuite.sh
+++ b/testsuite/gna/issue1387/testsuite.sh
@@ -11,6 +11,8 @@ elab_simulate repro3
analyze repro4.vhdl
+analyze repro5.vhdl
+
clean
echo "Test successful"