aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-11-03 07:46:54 +0100
committerTristan Gingold <tgingold@free.fr>2021-11-03 22:10:05 +0100
commiteb2b7a950937f5f414c4652514e66e31549bc8bd (patch)
tree762e219f141f2bfe63e290e36a4af500987a8ba0 /testsuite
parent0c12112fdd8a69f50a4b54e98755f3bc0e2d8441 (diff)
downloadghdl-eb2b7a950937f5f414c4652514e66e31549bc8bd.tar.gz
ghdl-eb2b7a950937f5f414c4652514e66e31549bc8bd.tar.bz2
ghdl-eb2b7a950937f5f414c4652514e66e31549bc8bd.zip
testsuite/gna: add a test for #1898
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue1898/scale1.vhdl8
-rw-r--r--testsuite/gna/issue1898/scale2.vhdl10
-rw-r--r--testsuite/gna/issue1898/scale3.vhdl9
-rw-r--r--testsuite/gna/issue1898/scale4.vhdl9
-rwxr-xr-xtestsuite/gna/issue1898/testsuite.sh14
5 files changed, 50 insertions, 0 deletions
diff --git a/testsuite/gna/issue1898/scale1.vhdl b/testsuite/gna/issue1898/scale1.vhdl
new file mode 100644
index 000000000..745645a99
--- /dev/null
+++ b/testsuite/gna/issue1898/scale1.vhdl
@@ -0,0 +1,8 @@
+entity scale is
+ port(w : out bit_vector(0 to 1));
+end entity scale;
+
+architecture boop of scale is
+begin
+ w <= '1' and b"01";
+end architecture boop;
diff --git a/testsuite/gna/issue1898/scale2.vhdl b/testsuite/gna/issue1898/scale2.vhdl
new file mode 100644
index 000000000..88a2a8958
--- /dev/null
+++ b/testsuite/gna/issue1898/scale2.vhdl
@@ -0,0 +1,10 @@
+entity scale2 is
+ port(v : in bit_vector(0 to 1);
+ a : in bit;
+ w : out bit_vector(0 to 1));
+end entity scale2;
+
+architecture boop of scale2 is
+begin
+ w <= a and v;
+end architecture boop;
diff --git a/testsuite/gna/issue1898/scale3.vhdl b/testsuite/gna/issue1898/scale3.vhdl
new file mode 100644
index 000000000..30f36bd79
--- /dev/null
+++ b/testsuite/gna/issue1898/scale3.vhdl
@@ -0,0 +1,9 @@
+entity scale3 is
+ port(v : in bit_vector(0 to 1);
+ w : out bit_vector(0 to 1));
+end entity scale3;
+
+architecture boop of scale3 is
+begin
+ w <= '1' and v;
+end architecture boop;
diff --git a/testsuite/gna/issue1898/scale4.vhdl b/testsuite/gna/issue1898/scale4.vhdl
new file mode 100644
index 000000000..8220ff8a9
--- /dev/null
+++ b/testsuite/gna/issue1898/scale4.vhdl
@@ -0,0 +1,9 @@
+entity scale4 is
+ port(b : in bit;
+ w : out bit_vector(0 to 1));
+end entity scale4;
+
+architecture boop of scale4 is
+begin
+ w <= b and "01";
+end architecture boop;
diff --git a/testsuite/gna/issue1898/testsuite.sh b/testsuite/gna/issue1898/testsuite.sh
new file mode 100755
index 000000000..9a535b7ba
--- /dev/null
+++ b/testsuite/gna/issue1898/testsuite.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+
+for f in scale2 scale3 scale4; do
+ analyze $f.vhdl
+ elab_simulate $f
+done
+
+clean
+
+echo "Test successful"