diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-08-05 18:27:58 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-08-05 18:27:58 +0200 |
commit | 160b8c7dd7398c7445a394885ef78a3483fe89e0 (patch) | |
tree | 31faece37280a8b45b41bf5c26b24a67dc6422bc /testsuite/gna | |
parent | 92d4e4421b71fce4ca4f11063f6819e056bc88e0 (diff) | |
download | ghdl-160b8c7dd7398c7445a394885ef78a3483fe89e0.tar.gz ghdl-160b8c7dd7398c7445a394885ef78a3483fe89e0.tar.bz2 ghdl-160b8c7dd7398c7445a394885ef78a3483fe89e0.zip |
testsuite/gna: add a test for #821
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue821/ent.vhdl | 21 | ||||
-rwxr-xr-x | testsuite/gna/issue821/testsuite.sh | 11 |
2 files changed, 32 insertions, 0 deletions
diff --git a/testsuite/gna/issue821/ent.vhdl b/testsuite/gna/issue821/ent.vhdl new file mode 100644 index 000000000..93ccbd322 --- /dev/null +++ b/testsuite/gna/issue821/ent.vhdl @@ -0,0 +1,21 @@ +entity tb is + generic (output_path : string := ""); +end entity; +architecture bench of tb is + type tb_cfg_t is record + s1 : string; + s2 : string; + end record tb_cfg_t; + + impure function decode return tb_cfg_t is + begin + return ( + s1 => output_path&"a", + s2 => "b" + ); + end function decode; +begin + proc : process begin + std.env.finish; + end process; +end bench; diff --git a/testsuite/gna/issue821/testsuite.sh b/testsuite/gna/issue821/testsuite.sh new file mode 100755 index 000000000..37861f14c --- /dev/null +++ b/testsuite/gna/issue821/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze ent.vhdl +elab_simulate tb + +clean + +echo "Test successful" |