diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-02 18:30:39 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-02 18:30:39 +0200 |
commit | 78e9cd6007b2dafc8931f3bbf51d84ec997da905 (patch) | |
tree | 9a51957e604aac9020a4d67d79e2f6ab44503aa2 /testsuite/gna | |
parent | 07eccf0e90d0f84afb70eba9aec802500471b956 (diff) | |
download | ghdl-78e9cd6007b2dafc8931f3bbf51d84ec997da905.tar.gz ghdl-78e9cd6007b2dafc8931f3bbf51d84ec997da905.tar.bz2 ghdl-78e9cd6007b2dafc8931f3bbf51d84ec997da905.zip |
testsuite/gna: add more tests for #1387
Diffstat (limited to 'testsuite/gna')
-rw-r--r-- | testsuite/gna/issue1387/repro2.vhdl | 15 | ||||
-rw-r--r-- | testsuite/gna/issue1387/repro3.vhdl | 25 | ||||
-rwxr-xr-x | testsuite/gna/issue1387/testsuite.sh | 4 |
3 files changed, 44 insertions, 0 deletions
diff --git a/testsuite/gna/issue1387/repro2.vhdl b/testsuite/gna/issue1387/repro2.vhdl new file mode 100644 index 000000000..30e32f596 --- /dev/null +++ b/testsuite/gna/issue1387/repro2.vhdl @@ -0,0 +1,15 @@ +package support_pkg2 is + function ">" ( l,r : integer ) return bit; +end; + +use work.support_pkg2.all; + +entity repro2 is +end; + +architecture behav of repro2 is + signal sov : bit_vector(0 to 21); +begin + cfg : if ">"(sov'length, 1) generate + end generate; +end; diff --git a/testsuite/gna/issue1387/repro3.vhdl b/testsuite/gna/issue1387/repro3.vhdl new file mode 100644 index 000000000..8e2dd1ebd --- /dev/null +++ b/testsuite/gna/issue1387/repro3.vhdl @@ -0,0 +1,25 @@ +package support_pkg3 is + function ">" ( l,r : integer ) return bit; +end; + +package body support_pkg3 is + function ">" ( l,r : integer ) return bit is + begin + if boolean'(l > r) then + return '1'; + else + return '0'; + end if; + end ">"; +end; + +use work.support_pkg3.all; + +entity repro3 is +end; + +architecture behav of repro3 is + signal sov : bit_vector(0 to 21); +begin + assert (sov'length > 1); +end; diff --git a/testsuite/gna/issue1387/testsuite.sh b/testsuite/gna/issue1387/testsuite.sh index 2251495f1..8c89d92cc 100755 --- a/testsuite/gna/issue1387/testsuite.sh +++ b/testsuite/gna/issue1387/testsuite.sh @@ -4,6 +4,10 @@ export GHDL_STD_FLAGS=--std=08 analyze repro1.vhdl +analyze repro2.vhdl + +analyze repro3.vhdl +elab_simulate repro3 clean |