From 5f6dfc4373418815637a1fa3de15a2d3b025b0ff Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 17 Feb 2017 06:56:12 +0100 Subject: More tests for unbounded records. --- testsuite/gna/issue238/call1.vhdl | 18 ++++++++++++++++++ testsuite/gna/issue238/call2.vhdl | 18 ++++++++++++++++++ testsuite/gna/issue238/sig1.vhdl | 9 +++++++++ testsuite/gna/issue238/testsuite.sh | 11 ++++++++++- 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 testsuite/gna/issue238/call1.vhdl create mode 100644 testsuite/gna/issue238/call2.vhdl create mode 100644 testsuite/gna/issue238/sig1.vhdl (limited to 'testsuite') diff --git a/testsuite/gna/issue238/call1.vhdl b/testsuite/gna/issue238/call1.vhdl new file mode 100644 index 000000000..0f9a42283 --- /dev/null +++ b/testsuite/gna/issue238/call1.vhdl @@ -0,0 +1,18 @@ +entity call1 is +end; + +use work.pkg.all; + +architecture behav of call1 is + function func return rec is + variable res : rec_4; + begin + return res; + end func; +begin + process + variable v : rec_4 := func; + begin + wait; + end process; +end behav; diff --git a/testsuite/gna/issue238/call2.vhdl b/testsuite/gna/issue238/call2.vhdl new file mode 100644 index 000000000..d5bad46cb --- /dev/null +++ b/testsuite/gna/issue238/call2.vhdl @@ -0,0 +1,18 @@ +entity call2 is +end; + +use work.pkg.all; + +architecture behav of call2 is + function func return rec is + variable res : rec_4; + begin + return res; + end func; +begin + process + constant v : rec := func; + begin + wait; + end process; +end behav; diff --git a/testsuite/gna/issue238/sig1.vhdl b/testsuite/gna/issue238/sig1.vhdl new file mode 100644 index 000000000..1a1d4c441 --- /dev/null +++ b/testsuite/gna/issue238/sig1.vhdl @@ -0,0 +1,9 @@ +entity sig1 is +end; + +use work.pkg.all; + +architecture behav of sig1 is + signal s : rec_4; +begin +end behav; diff --git a/testsuite/gna/issue238/testsuite.sh b/testsuite/gna/issue238/testsuite.sh index 368be0f47..9c17b1ff2 100755 --- a/testsuite/gna/issue238/testsuite.sh +++ b/testsuite/gna/issue238/testsuite.sh @@ -8,9 +8,18 @@ export GHDL_STD_FLAGS=--std=08 analyze cst.vhdl pkg.vhdl analyze var1.vhdl var2.vhdl var3.vhdl var4.vhdl -analyze assign1.vhdl proc1.vhdl +analyze assign1.vhdl proc1.vhdl elab_simulate proc1 +analyze sig1.vhdl +elab_simulate sig1 + +analyze call1.vhdl +elab_simulate call1 + +analyze call2.vhdl +elab_simulate call2 + clean echo "Test successful" -- cgit v1.2.3