aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-05-27 06:39:52 +0200
committerTristan Gingold <tgingold@free.fr>2016-05-27 06:39:52 +0200
commit97c46f4c2f3efe2bba45edc50e98aa968155caec (patch)
tree690f69e04c7f3b089e7d02e867915be1f3acdc23
parent28e0065c7f83380d8f91977c4b3c3ad9ed97e3cc (diff)
downloadghdl-97c46f4c2f3efe2bba45edc50e98aa968155caec.tar.gz
ghdl-97c46f4c2f3efe2bba45edc50e98aa968155caec.tar.bz2
ghdl-97c46f4c2f3efe2bba45edc50e98aa968155caec.zip
Add testcase for issue73.
-rwxr-xr-xtestsuite/gna/issue73/testsuite.sh10
-rw-r--r--testsuite/gna/issue73/x.vhdl34
2 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/gna/issue73/testsuite.sh b/testsuite/gna/issue73/testsuite.sh
new file mode 100755
index 000000000..f75225062
--- /dev/null
+++ b/testsuite/gna/issue73/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze x.vhdl
+elab_simulate test
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/issue73/x.vhdl b/testsuite/gna/issue73/x.vhdl
new file mode 100644
index 000000000..afb27eec2
--- /dev/null
+++ b/testsuite/gna/issue73/x.vhdl
@@ -0,0 +1,34 @@
+entity test is
+end entity test;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+architecture test of test is
+
+begin
+
+ p: process is
+
+ subtype xa_t is std_ulogic_vector(3 downto 0);
+ subtype ya_t is std_ulogic_vector(1 downto 0);
+
+ procedure x(constant a : xa_t) is
+ begin
+ for i in a'range loop
+ report "x.a(" & integer'image(i) & "): " & std_ulogic'image(a(i)) severity note;
+ end loop;
+ end procedure x;
+
+ procedure y(constant a : in ya_t) is
+ begin
+ x(a(1 downto 0) => a,
+ a(3 downto 2) => (others => '0'));
+ end procedure y;
+
+ begin
+ y(a => "11");
+ wait;
+ end process p;
+
+end architecture test;