From c5ef498aeeb6eb7ebd2ba998940986a119ce3f09 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 26 Aug 2016 05:23:17 +0200 Subject: Add testcase for issue #140 --- testsuite/gna/issue140/OSVVM_TB.vhd | 31 +++++++++++++++++++++++++++++++ testsuite/gna/issue140/repro.vhdl | 12 ++++++++++++ testsuite/gna/issue140/testsuite.sh | 9 +++++++++ 3 files changed, 52 insertions(+) create mode 100644 testsuite/gna/issue140/OSVVM_TB.vhd create mode 100644 testsuite/gna/issue140/repro.vhdl create mode 100755 testsuite/gna/issue140/testsuite.sh (limited to 'testsuite/gna') 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" -- cgit v1.2.3