diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-02-06 08:04:14 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-02-07 05:33:00 +0100 |
commit | f0c98e42fdee37d6a8781f03a17474e277ff3155 (patch) | |
tree | 76835e81fcc298df4efffee50ca99e114af5856e | |
parent | 2a32833efab2fbe065a9a4298e181ac2fb117833 (diff) | |
download | ghdl-f0c98e42fdee37d6a8781f03a17474e277ff3155.tar.gz ghdl-f0c98e42fdee37d6a8781f03a17474e277ff3155.tar.bz2 ghdl-f0c98e42fdee37d6a8781f03a17474e277ff3155.zip |
Add testcase for previous patch.
-rw-r--r-- | testsuite/gna/issue317/repro6.vhdl | 41 | ||||
-rwxr-xr-x | testsuite/gna/issue317/testsuite.sh | 4 |
2 files changed, 45 insertions, 0 deletions
diff --git a/testsuite/gna/issue317/repro6.vhdl b/testsuite/gna/issue317/repro6.vhdl new file mode 100644 index 000000000..13e7d801d --- /dev/null +++ b/testsuite/gna/issue317/repro6.vhdl @@ -0,0 +1,41 @@ +package repro6_gen_queue is + generic (type element_type); + + procedure queue_add (el : element_type); +end repro6_gen_queue; + +package body repro6_gen_queue is + procedure queue_add (el : element_type) is + begin + null; + end queue_add; +end repro6_gen_queue; + +package repro6_gen_board is + generic (type element_type); + + procedure board_add (e : element_type); +end repro6_gen_board; + +package body repro6_gen_board is + package board_queue is new work.repro6_gen_queue + generic map (element_type => element_type); + procedure board_add (e : element_type) is + begin + board_queue.queue_add(e); + end board_add; +end repro6_gen_board; + +entity repro6 is +end repro6; + +architecture behav of repro6 is + package my_board is new work.repro6_gen_board + generic map (element_type => natural); +begin + process + begin + my_board.board_add(5); + wait; + end process; +end behav; diff --git a/testsuite/gna/issue317/testsuite.sh b/testsuite/gna/issue317/testsuite.sh index 87e669b82..e1455ea71 100755 --- a/testsuite/gna/issue317/testsuite.sh +++ b/testsuite/gna/issue317/testsuite.sh @@ -23,6 +23,10 @@ elab_simulate repro4 analyze repro5.vhdl elab_simulate repro5 +# Reproducer6 +analyze repro6.vhdl +elab_simulate repro6 + # OSVVM if true; then analyze --work=osvvm OSVVM/NamePkg.vhd |