aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-03-30 19:43:40 +0200
committerTristan Gingold <tgingold@free.fr>2021-03-30 19:44:45 +0200
commit8a8c17f8e828f747cf06e975a9433d1e5a2d3a0f (patch)
treee1e8b8be9a2bde6519f8664a56cdb22873c366ab /testsuite/gna
parenta3292a72683b77c8b0054ffd836c029648a89c55 (diff)
downloadghdl-8a8c17f8e828f747cf06e975a9433d1e5a2d3a0f.tar.gz
ghdl-8a8c17f8e828f747cf06e975a9433d1e5a2d3a0f.tar.bz2
ghdl-8a8c17f8e828f747cf06e975a9433d1e5a2d3a0f.zip
testsuite/gna: add a test for #1697
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue1697/e1.vhdl10
-rw-r--r--testsuite/gna/issue1697/e2.vhdl11
-rw-r--r--testsuite/gna/issue1697/e3.vhdl11
-rwxr-xr-xtestsuite/gna/issue1697/testsuite.sh17
4 files changed, 49 insertions, 0 deletions
diff --git a/testsuite/gna/issue1697/e1.vhdl b/testsuite/gna/issue1697/e1.vhdl
new file mode 100644
index 000000000..bfa4aaaa5
--- /dev/null
+++ b/testsuite/gna/issue1697/e1.vhdl
@@ -0,0 +1,10 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity e is
+ port (i : in std_logic_vector(2 downto 0) := ('1','0'));
+end entity;
+
+architecture a of e is
+begin
+end architecture;
diff --git a/testsuite/gna/issue1697/e2.vhdl b/testsuite/gna/issue1697/e2.vhdl
new file mode 100644
index 000000000..c9d396654
--- /dev/null
+++ b/testsuite/gna/issue1697/e2.vhdl
@@ -0,0 +1,11 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity e is
+ port (o : out std_logic_vector(2 downto 0));
+end entity;
+
+architecture a of e is
+begin
+ o <= ('1','0');
+end architecture;
diff --git a/testsuite/gna/issue1697/e3.vhdl b/testsuite/gna/issue1697/e3.vhdl
new file mode 100644
index 000000000..1bf696f70
--- /dev/null
+++ b/testsuite/gna/issue1697/e3.vhdl
@@ -0,0 +1,11 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity e is
+ port (o : out std_logic_vector(4 downto 0));
+end entity;
+
+architecture a of e is
+begin
+ o <= ("01",'0');
+end architecture;
diff --git a/testsuite/gna/issue1697/testsuite.sh b/testsuite/gna/issue1697/testsuite.sh
new file mode 100755
index 000000000..497e68d29
--- /dev/null
+++ b/testsuite/gna/issue1697/testsuite.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze_failure e1.vhdl
+analyze_failure e2.vhdl
+
+clean
+
+export GHDL_STD_FLAGS=--std=93
+analyze_failure e1.vhdl
+analyze_failure e2.vhdl
+
+clean
+
+echo "Test successful"