aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-08-03 03:51:30 +0200
committerTristan Gingold <tgingold@free.fr>2021-08-03 03:51:30 +0200
commitcf22e6dd1fc0fd7fea72252f8c1ae9d4a3c431cd (patch)
tree99fbaf955e38a69b00f19cf5ad40e92efeeef6a9
parentc3899842144d9408c571751326b449e60d41f94b (diff)
downloadghdl-cf22e6dd1fc0fd7fea72252f8c1ae9d4a3c431cd.tar.gz
ghdl-cf22e6dd1fc0fd7fea72252f8c1ae9d4a3c431cd.tar.bz2
ghdl-cf22e6dd1fc0fd7fea72252f8c1ae9d4a3c431cd.zip
testsuite/gna: add testcase for #1455
-rw-r--r--testsuite/gna/issue1455/pkg0.vhdl8
-rw-r--r--testsuite/gna/issue1455/pkg1.vhdl8
-rw-r--r--testsuite/gna/issue1455/pkg2.vhdl9
-rw-r--r--testsuite/gna/issue1455/pkg3.vhdl8
-rw-r--r--testsuite/gna/issue1455/pkg4.vhdl8
-rw-r--r--testsuite/gna/issue1455/pkg5.vhdl8
-rw-r--r--testsuite/gna/issue1455/pkg6.vhdl8
-rw-r--r--testsuite/gna/issue1455/tb.vhdl12
-rw-r--r--testsuite/gna/issue1455/tb1.vhdl8
-rwxr-xr-xtestsuite/gna/issue1455/testsuite.sh18
10 files changed, 95 insertions, 0 deletions
diff --git a/testsuite/gna/issue1455/pkg0.vhdl b/testsuite/gna/issue1455/pkg0.vhdl
new file mode 100644
index 000000000..3ec9b7180
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg0.vhdl
@@ -0,0 +1,8 @@
+package pkg0 is
+ type my_arr2D_t is array (natural range <>) of real_vector;
+
+ constant my_arr2D: my_arr2D_t(0 to 1)(0 to 1) := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
diff --git a/testsuite/gna/issue1455/pkg1.vhdl b/testsuite/gna/issue1455/pkg1.vhdl
new file mode 100644
index 000000000..641671f20
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg1.vhdl
@@ -0,0 +1,8 @@
+package pkg1 is
+ type my_arr2D_t is array (natural range <>) of real_vector;
+
+ constant my_arr2D: my_arr2D_t := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
diff --git a/testsuite/gna/issue1455/pkg2.vhdl b/testsuite/gna/issue1455/pkg2.vhdl
new file mode 100644
index 000000000..14ff15d03
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg2.vhdl
@@ -0,0 +1,9 @@
+package pkg2 is
+ type my_arr2D_t is array (natural range <>) of real_vector;
+
+ constant my_arr2D: my_arr2D_t(0 to 1) := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
+
diff --git a/testsuite/gna/issue1455/pkg3.vhdl b/testsuite/gna/issue1455/pkg3.vhdl
new file mode 100644
index 000000000..ea3848150
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg3.vhdl
@@ -0,0 +1,8 @@
+package pkg3 is
+ type my_arr2D_t is array (0 to 1) of real_vector;
+
+ constant my_arr2D: my_arr2D_t := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
diff --git a/testsuite/gna/issue1455/pkg4.vhdl b/testsuite/gna/issue1455/pkg4.vhdl
new file mode 100644
index 000000000..d541b833c
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg4.vhdl
@@ -0,0 +1,8 @@
+package pkg4 is
+ type my_arr2D_t is array (0 to 1) of real_vector;
+
+ constant my_arr2D: my_arr2D_t(0 to 1) := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
diff --git a/testsuite/gna/issue1455/pkg5.vhdl b/testsuite/gna/issue1455/pkg5.vhdl
new file mode 100644
index 000000000..a196d7a59
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg5.vhdl
@@ -0,0 +1,8 @@
+package pkg5 is
+ type my_arr2D_t is array (0 to 1) of real_vector;
+
+ constant my_arr2D: my_arr2D_t(open)(0 to 1) := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
diff --git a/testsuite/gna/issue1455/pkg6.vhdl b/testsuite/gna/issue1455/pkg6.vhdl
new file mode 100644
index 000000000..4d0a97c2f
--- /dev/null
+++ b/testsuite/gna/issue1455/pkg6.vhdl
@@ -0,0 +1,8 @@
+package pkg6 is
+ type my_arr2D_t is array (0 to 1) of real_vector;
+
+ constant my_arr2D: my_arr2D_t(0 to 1)(0 to 1) := (
+ (0.0, 0.1),
+ (1.0, 1.1)
+ );
+end;
diff --git a/testsuite/gna/issue1455/tb.vhdl b/testsuite/gna/issue1455/tb.vhdl
new file mode 100644
index 000000000..736cd6674
--- /dev/null
+++ b/testsuite/gna/issue1455/tb.vhdl
@@ -0,0 +1,12 @@
+entity tb is
+end tb;
+
+use work.pkg0.all;
+use work.pkg1.all;
+use work.pkg2.all;
+use work.pkg3.all;
+use work.pkg5.all;
+
+architecture behav of tb is
+begin
+end behav;
diff --git a/testsuite/gna/issue1455/tb1.vhdl b/testsuite/gna/issue1455/tb1.vhdl
new file mode 100644
index 000000000..55796aab1
--- /dev/null
+++ b/testsuite/gna/issue1455/tb1.vhdl
@@ -0,0 +1,8 @@
+entity tb1 is
+end tb1;
+
+use work.pkg1.all;
+
+architecture behav of tb1 is
+begin
+end behav;
diff --git a/testsuite/gna/issue1455/testsuite.sh b/testsuite/gna/issue1455/testsuite.sh
new file mode 100755
index 000000000..9c1982e67
--- /dev/null
+++ b/testsuite/gna/issue1455/testsuite.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze pkg0.vhdl
+analyze pkg1.vhdl
+analyze pkg2.vhdl
+analyze pkg3.vhdl
+analyze_failure pkg4.vhdl
+analyze pkg5.vhdl
+analyze_failure pkg6.vhdl
+
+analyze tb.vhdl
+elab_simulate tb
+clean
+
+echo "Test successful"