aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-27 17:51:12 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-28 17:47:47 +0200
commita1154ddb9051e337d309d8c2766fa11657f6adf7 (patch)
tree19d2f6efe1643fedda0a7b4e8de41047371e7985
parent91bf00df6205c43048d8e9d309d5b8029a57b2fd (diff)
downloadghdl-a1154ddb9051e337d309d8c2766fa11657f6adf7.tar.gz
ghdl-a1154ddb9051e337d309d8c2766fa11657f6adf7.tar.bz2
ghdl-a1154ddb9051e337d309d8c2766fa11657f6adf7.zip
testsuite/gna: add a testcase for #1287
-rw-r--r--testsuite/gna/issue1287/myentity.vhdl11
-rw-r--r--testsuite/gna/issue1287/myentity2.vhdl13
-rwxr-xr-xtestsuite/gna/issue1287/testsuite.sh15
3 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/gna/issue1287/myentity.vhdl b/testsuite/gna/issue1287/myentity.vhdl
new file mode 100644
index 000000000..8f318bdf6
--- /dev/null
+++ b/testsuite/gna/issue1287/myentity.vhdl
@@ -0,0 +1,11 @@
+entity myentity is
+end myentity;
+
+architecture arch of myentity is
+ type myrecord is record
+ a : bit_vector;
+ end record;
+ subtype myboundedrecord is myrecord(a(1 downto 0));
+ type myarray is array (natural range <>) of myboundedrecord;
+begin
+end arch;
diff --git a/testsuite/gna/issue1287/myentity2.vhdl b/testsuite/gna/issue1287/myentity2.vhdl
new file mode 100644
index 000000000..fe3cf56c5
--- /dev/null
+++ b/testsuite/gna/issue1287/myentity2.vhdl
@@ -0,0 +1,13 @@
+entity myentity2 is
+end myentity2;
+
+architecture arch of myentity2 is
+ type myrecord is record
+ a : bit_vector;
+ end record;
+ subtype myboundedrecord is myrecord(a(1 downto 0));
+ type myarray is array (natural range <>) of myboundedrecord;
+
+ signal s : myarray (1 downto 0);
+begin
+end arch;
diff --git a/testsuite/gna/issue1287/testsuite.sh b/testsuite/gna/issue1287/testsuite.sh
new file mode 100755
index 000000000..672cfb220
--- /dev/null
+++ b/testsuite/gna/issue1287/testsuite.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+
+analyze myentity.vhdl
+elab_simulate myentity
+
+analyze myentity2.vhdl
+elab_simulate myentity2
+
+clean
+
+echo "Test successful"