aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-01-23 08:03:49 +0100
committerTristan Gingold <tgingold@free.fr>2017-01-23 08:03:49 +0100
commitec4ef7f6e18595c78db27946f38235503c725d88 (patch)
treef93f59714a2bf7ab9d13a3907a4c973e6fda15a3 /testsuite/gna
parent5c4063d0868f9d511c4aebb518c24a4e0086e7bb (diff)
downloadghdl-ec4ef7f6e18595c78db27946f38235503c725d88.tar.gz
ghdl-ec4ef7f6e18595c78db27946f38235503c725d88.tar.bz2
ghdl-ec4ef7f6e18595c78db27946f38235503c725d88.zip
Testcase for #261
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue261/e.vhdl28
-rw-r--r--testsuite/gna/issue261/e1.vhdl28
-rwxr-xr-xtestsuite/gna/issue261/testsuite.sh13
3 files changed, 69 insertions, 0 deletions
diff --git a/testsuite/gna/issue261/e.vhdl b/testsuite/gna/issue261/e.vhdl
new file mode 100644
index 000000000..c4cde381f
--- /dev/null
+++ b/testsuite/gna/issue261/e.vhdl
@@ -0,0 +1,28 @@
+entity e is
+end entity;
+
+architecture a of e is
+ type AT is access INTEGER;
+ type FT is file of INTEGER;
+begin
+ process
+ variable BV : bit_vector(0 to 1);
+ variable V : AT;
+ file F : FT;
+ begin
+ report BV'simple_name; -- BV
+ report BV'subtype'simple_name; -- _anon [line 14]
+ report BV'subtype'base'simple_name; -- bit_vector
+-- report BV'element'simple_name; -- bit
+
+ report V'simple_name; -- V
+ report V'subtype'simple_name; -- V
+ report V'subtype'base'simple_name; -- AT
+
+ report F'simple_name; -- F
+ report F'subtype'simple_name; -- FT
+ report F'subtype'base'simple_name; -- FT
+
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/issue261/e1.vhdl b/testsuite/gna/issue261/e1.vhdl
new file mode 100644
index 000000000..fa3343930
--- /dev/null
+++ b/testsuite/gna/issue261/e1.vhdl
@@ -0,0 +1,28 @@
+entity e is
+end entity;
+
+architecture a of e is
+ type AT is access INTEGER;
+ type FT is file of INTEGER;
+begin
+ process
+ variable BV : bit_vector(0 to 1);
+ variable V : AT;
+ file F : FT;
+ begin
+ report BV'simple_name; -- BV
+-- report BV'subtype'simple_name; -- _anon [line 14]
+ report BV'subtype'base'simple_name; -- bit_vector
+-- report BV'element'simple_name; -- bit
+
+ report V'simple_name; -- V
+ report V'subtype'simple_name; -- V
+ report V'subtype'base'simple_name; -- AT
+
+ report F'simple_name; -- F
+ report F'subtype'simple_name; -- FT
+ report F'subtype'base'simple_name; -- FT
+
+ wait;
+ end process;
+end architecture;
diff --git a/testsuite/gna/issue261/testsuite.sh b/testsuite/gna/issue261/testsuite.sh
new file mode 100755
index 000000000..1c0f0e57e
--- /dev/null
+++ b/testsuite/gna/issue261/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+export GHDL_STD_FLAGS=--std=08
+analyze_failure e.vhdl
+
+analyze e1.vhdl
+elab_simulate e
+
+clean
+
+echo "Test successful"