diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-01-25 21:35:19 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-01-26 21:56:29 +0100 |
commit | 061d1a8726712c3f57b8fe57bf7ef89331a33ed0 (patch) | |
tree | ff9f8ae12bbca1a976b6718baa0e1062c2f771fc /testsuite | |
parent | 03384250947e4b087db59d1671373855f73bb4ed (diff) | |
download | ghdl-061d1a8726712c3f57b8fe57bf7ef89331a33ed0.tar.gz ghdl-061d1a8726712c3f57b8fe57bf7ef89331a33ed0.tar.bz2 ghdl-061d1a8726712c3f57b8fe57bf7ef89331a33ed0.zip |
testsuite/gna: add a test for #2326
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/gna/issue2326/generic_package.vhdl | 19 | ||||
-rwxr-xr-x | testsuite/gna/issue2326/testsuite.sh | 11 |
2 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/gna/issue2326/generic_package.vhdl b/testsuite/gna/issue2326/generic_package.vhdl new file mode 100644 index 000000000..377a59216 --- /dev/null +++ b/testsuite/gna/issue2326/generic_package.vhdl @@ -0,0 +1,19 @@ +package generic_package is + generic (type t); + subtype st is t; +end; + +entity testbench is +end; + +architecture sim of testbench is + package gp is new work.generic_package + generic map (t => bit_vector(1 downto 0)); + + constant c : gp.st := "10"; +begin + test : process begin + report to_string(c); + wait; + end process; +end; diff --git a/testsuite/gna/issue2326/testsuite.sh b/testsuite/gna/issue2326/testsuite.sh new file mode 100755 index 000000000..999cf4039 --- /dev/null +++ b/testsuite/gna/issue2326/testsuite.sh @@ -0,0 +1,11 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze generic_package.vhdl +elab_simulate testbench + +clean + +echo "Test successful" |