aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-02-06 08:46:48 +0100
committerTristan Gingold <tgingold@free.fr>2021-02-06 12:27:27 +0100
commit982f1d7ce9c8f563780a52714df98469bf58721e (patch)
treefe88fdf63f03b1112cdfc476fc9ebb3b3d1fa3eb /testsuite
parent3a7a0a67d4289e2559afe751a64a9a097d2e1a3a (diff)
downloadghdl-982f1d7ce9c8f563780a52714df98469bf58721e.tar.gz
ghdl-982f1d7ce9c8f563780a52714df98469bf58721e.tar.bz2
ghdl-982f1d7ce9c8f563780a52714df98469bf58721e.zip
testsuite/gna: add a test for #1631
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue1631/bug.vhdl10
-rw-r--r--testsuite/gna/issue1631/bug2.vhdl10
-rw-r--r--testsuite/gna/issue1631/bug3.vhdl7
-rw-r--r--testsuite/gna/issue1631/bug4.vhdl8
-rwxr-xr-xtestsuite/gna/issue1631/testsuite.sh10
5 files changed, 45 insertions, 0 deletions
diff --git a/testsuite/gna/issue1631/bug.vhdl b/testsuite/gna/issue1631/bug.vhdl
new file mode 100644
index 000000000..087a76505
--- /dev/null
+++ b/testsuite/gna/issue1631/bug.vhdl
@@ -0,0 +1,10 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity bug is
+end bug;
+
+architecture behavior of bug is
+begin
+ var1 : std_logic(1 downto 0);
+end behavior;
diff --git a/testsuite/gna/issue1631/bug2.vhdl b/testsuite/gna/issue1631/bug2.vhdl
new file mode 100644
index 000000000..14dd14734
--- /dev/null
+++ b/testsuite/gna/issue1631/bug2.vhdl
@@ -0,0 +1,10 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity bug2 is
+end;
+
+architecture behavior of bug2 is
+begin
+ std_logic(1 downto 0);
+end behavior;
diff --git a/testsuite/gna/issue1631/bug3.vhdl b/testsuite/gna/issue1631/bug3.vhdl
new file mode 100644
index 000000000..48d8f9c03
--- /dev/null
+++ b/testsuite/gna/issue1631/bug3.vhdl
@@ -0,0 +1,7 @@
+entity bug3 is
+end;
+
+architecture behavior of bug3 is
+begin
+ name(1 downto 0);
+end behavior;
diff --git a/testsuite/gna/issue1631/bug4.vhdl b/testsuite/gna/issue1631/bug4.vhdl
new file mode 100644
index 000000000..ae9f01ca2
--- /dev/null
+++ b/testsuite/gna/issue1631/bug4.vhdl
@@ -0,0 +1,8 @@
+entity bug3 is
+end;
+
+architecture behavior of bug3 is
+ constant c : string := "hello";
+begin
+ c(1 downto 0);
+end behavior;
diff --git a/testsuite/gna/issue1631/testsuite.sh b/testsuite/gna/issue1631/testsuite.sh
new file mode 100755
index 000000000..1c839d83b
--- /dev/null
+++ b/testsuite/gna/issue1631/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure bug.vhdl
+analyze_failure bug2.vhdl
+analyze_failure bug3.vhdl
+analyze_failure bug4.vhdl
+
+echo "Test successful"