aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue167/pkg1.vhdl16
-rw-r--r--testsuite/gna/issue167/pkg2.vhdl16
-rwxr-xr-xtestsuite/gna/issue167/testsuite.sh10
3 files changed, 42 insertions, 0 deletions
diff --git a/testsuite/gna/issue167/pkg1.vhdl b/testsuite/gna/issue167/pkg1.vhdl
new file mode 100644
index 000000000..618e8a7ec
--- /dev/null
+++ b/testsuite/gna/issue167/pkg1.vhdl
@@ -0,0 +1,16 @@
+package p is
+ component c is
+ generic (
+ -- None of these work in GHDL 1a1d378dcafeca5a18dfa8862ebe412efa1e9718
+ -- together with the ports defined below.
+ g : bit_vector
+-- g : bit_vector := x"0"
+-- g : bit_vector(3 downto 0) := x"0"
+-- g : bit_vector(3 downto 0)
+ );
+ port (
+ -- fails if generic 'g' is referenced
+ x : bit_vector(g'length-1 downto 0)
+ );
+ end component;
+end package;
diff --git a/testsuite/gna/issue167/pkg2.vhdl b/testsuite/gna/issue167/pkg2.vhdl
new file mode 100644
index 000000000..5b528ed03
--- /dev/null
+++ b/testsuite/gna/issue167/pkg2.vhdl
@@ -0,0 +1,16 @@
+package p is
+ component c is
+ generic (
+ -- None of these work in GHDL 1a1d378dcafeca5a18dfa8862ebe412efa1e9718
+ -- together with the ports defined below.
+-- g : bit_vector
+-- g : bit_vector := x"0"
+-- g : bit_vector(3 downto 0) := x"0"
+ g : bit_vector(3 downto 0)
+ );
+ port (
+ -- fails if generic 'g' is referenced
+ x : bit_vector(g'length-1 downto 0)
+ );
+ end component;
+end package;
diff --git a/testsuite/gna/issue167/testsuite.sh b/testsuite/gna/issue167/testsuite.sh
new file mode 100755
index 000000000..68926e014
--- /dev/null
+++ b/testsuite/gna/issue167/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+analyze pkg1.vhdl
+analyze pkg2.vhdl
+clean
+
+echo "Test successful"