diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-10-16 06:22:36 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-10-16 06:22:36 +0200 |
commit | 0a671eac348e780033dfe63c82724ae2a772b4f9 (patch) | |
tree | c79c8f28d3aec2038a9609cbfe2230081f70ce5c /testsuite/gna/issue2217 | |
parent | 22bc0c766413107d826c675e726a32735f8601cc (diff) | |
download | ghdl-0a671eac348e780033dfe63c82724ae2a772b4f9.tar.gz ghdl-0a671eac348e780033dfe63c82724ae2a772b4f9.tar.bz2 ghdl-0a671eac348e780033dfe63c82724ae2a772b4f9.zip |
testsuite/gna: add a test for #2217
Diffstat (limited to 'testsuite/gna/issue2217')
-rw-r--r-- | testsuite/gna/issue2217/repro.vhdl | 12 | ||||
-rw-r--r-- | testsuite/gna/issue2217/test1.vhdl | 32 | ||||
-rw-r--r-- | testsuite/gna/issue2217/test2.vhdl | 23 | ||||
-rwxr-xr-x | testsuite/gna/issue2217/testsuite.sh | 12 |
4 files changed, 79 insertions, 0 deletions
diff --git a/testsuite/gna/issue2217/repro.vhdl b/testsuite/gna/issue2217/repro.vhdl new file mode 100644 index 000000000..5e92545f4 --- /dev/null +++ b/testsuite/gna/issue2217/repro.vhdl @@ -0,0 +1,12 @@ +entity repro is +end entity repro; + +architecture beh of repro is + procedure enable_log_msg(variable msg_id_panel : boolean_vector)is begin + end procedure; + + procedure enable_log_msg(msg : string)is begin + end procedure; +begin + enable_log_msg("Test test"); +end architecture beh; diff --git a/testsuite/gna/issue2217/test1.vhdl b/testsuite/gna/issue2217/test1.vhdl new file mode 100644 index 000000000..646cabb66 --- /dev/null +++ b/testsuite/gna/issue2217/test1.vhdl @@ -0,0 +1,32 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is +end entity test; +architecture beh of test is + type t_msg_id is (ONE, TWO); + type t_msg_id_panel is array (t_msg_id'left to t_msg_id'right) of boolean; + type t_quietness is (NON_QUIET, QUIET); + procedure enable_log_msg( + constant msg_id : t_msg_id; + variable msg_id_panel : inout t_msg_id_panel; + constant msg : string := ""; + constant scope : string := ""; + quietness : t_quietness := NON_QUIET + )is begin + end procedure; + + procedure enable_log_msg( + msg_id : t_msg_id; + msg : string; + quietness : t_quietness := NON_QUIET; + scope : string := "" + )is begin + end procedure; +begin +process(all) +begin + enable_log_msg(ONE, "Test test"); +end process; +end architecture beh; diff --git a/testsuite/gna/issue2217/test2.vhdl b/testsuite/gna/issue2217/test2.vhdl new file mode 100644 index 000000000..368d305af --- /dev/null +++ b/testsuite/gna/issue2217/test2.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity test is +end entity test; +architecture beh of test is + type t_msg_id_panel is array (natural range <>) of boolean; + procedure enable_log_msg( + variable msg_id_panel : t_msg_id_panel + )is begin + end procedure; + + procedure enable_log_msg( + msg : string + )is begin + end procedure; +begin +process(all) +begin + enable_log_msg("Test test"); +end process; +end architecture beh; diff --git a/testsuite/gna/issue2217/testsuite.sh b/testsuite/gna/issue2217/testsuite.sh new file mode 100755 index 000000000..05f50722e --- /dev/null +++ b/testsuite/gna/issue2217/testsuite.sh @@ -0,0 +1,12 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze test1.vhdl +analyze test2.vhdl +analyze repro.vhdl + +clean + +echo "Test successful" |