From 061d1a8726712c3f57b8fe57bf7ef89331a33ed0 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 25 Jan 2023 21:35:19 +0100 Subject: testsuite/gna: add a test for #2326 --- testsuite/gna/issue2326/generic_package.vhdl | 19 +++++++++++++++++++ testsuite/gna/issue2326/testsuite.sh | 11 +++++++++++ 2 files changed, 30 insertions(+) create mode 100644 testsuite/gna/issue2326/generic_package.vhdl create mode 100755 testsuite/gna/issue2326/testsuite.sh (limited to 'testsuite') 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" -- cgit v1.2.3