aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-08-26 05:23:17 +0200
committerTristan Gingold <tgingold@free.fr>2016-08-26 05:23:17 +0200
commitc5ef498aeeb6eb7ebd2ba998940986a119ce3f09 (patch)
tree82e02a1b724b90765602c2b59efa52ac94b57c7d /testsuite/gna
parent9664075eef2034c4ef2af28d6aac092aa854cbf4 (diff)
downloadghdl-c5ef498aeeb6eb7ebd2ba998940986a119ce3f09.tar.gz
ghdl-c5ef498aeeb6eb7ebd2ba998940986a119ce3f09.tar.bz2
ghdl-c5ef498aeeb6eb7ebd2ba998940986a119ce3f09.zip
Add testcase for issue #140
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/issue140/OSVVM_TB.vhd31
-rw-r--r--testsuite/gna/issue140/repro.vhdl12
-rwxr-xr-xtestsuite/gna/issue140/testsuite.sh9
3 files changed, 52 insertions, 0 deletions
diff --git a/testsuite/gna/issue140/OSVVM_TB.vhd b/testsuite/gna/issue140/OSVVM_TB.vhd
new file mode 100644
index 000000000..e7a73c367
--- /dev/null
+++ b/testsuite/gna/issue140/OSVVM_TB.vhd
@@ -0,0 +1,31 @@
+entity OSVVM_TB is
+end OSVVM_TB;
+
+architecture behavioral of OSVVM_TB is
+
+type CovPType is protected
+procedure AddBins(n : integer);
+end protected;
+
+type CovPType is protected body
+
+procedure AddBins(n : integer) is
+begin
+ null;
+end AddBins;
+
+end protected body;
+
+ shared variable Timeout_aborts_transfer : CovPType;
+
+begin
+
+ --Master
+MASTER_STIMULUS: process
+begin
+ Timeout_aborts_transfer.AddBins(0); -- comment this line out and the following piece of garbage is correctly diagnosed
+ Timeout_aborts_transfer : CovPType; -- syntax error here!
+end process;
+
+end behavioral;
+
diff --git a/testsuite/gna/issue140/repro.vhdl b/testsuite/gna/issue140/repro.vhdl
new file mode 100644
index 000000000..794124572
--- /dev/null
+++ b/testsuite/gna/issue140/repro.vhdl
@@ -0,0 +1,12 @@
+entity tb is
+end tb;
+
+architecture behav of tb is
+begin
+ p : process
+ variable v : natural;
+ begin
+ v := 5;
+ v: null;
+ end process;
+end behav;
diff --git a/testsuite/gna/issue140/testsuite.sh b/testsuite/gna/issue140/testsuite.sh
new file mode 100755
index 000000000..738aecee2
--- /dev/null
+++ b/testsuite/gna/issue140/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure --std=08 OSVVM_TB.vhd
+
+clean
+
+echo "Test successful"