diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-26 16:47:25 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-26 16:47:25 +0200 |
commit | 902cfd1df9b55f78f180c37f1acf8e5f2bd164fd (patch) | |
tree | e74b0e0869e15e45c54fb53062c8126e6662bb20 /testsuite/synth | |
parent | 6a375b0d724d9f04b56857675827c9cf6bab6498 (diff) | |
download | ghdl-902cfd1df9b55f78f180c37f1acf8e5f2bd164fd.tar.gz ghdl-902cfd1df9b55f78f180c37f1acf8e5f2bd164fd.tar.bz2 ghdl-902cfd1df9b55f78f180c37f1acf8e5f2bd164fd.zip |
testsuite/synth: add test for #1265
Diffstat (limited to 'testsuite/synth')
-rw-r--r-- | testsuite/synth/issue1265/issue.vhdl | 14 | ||||
-rwxr-xr-x | testsuite/synth/issue1265/testsuite.sh | 8 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/synth/issue1265/issue.vhdl b/testsuite/synth/issue1265/issue.vhdl new file mode 100644 index 000000000..098305fa4 --- /dev/null +++ b/testsuite/synth/issue1265/issue.vhdl @@ -0,0 +1,14 @@ +library ieee; +use ieee.std_logic_1164.all; +use ieee.numeric_std.all; + +entity issue is + port (sub_uns : out unsigned (8-1 downto 0); + sub_sgn : out signed (8-1 downto 0)); +end issue; + +architecture beh of issue is +begin + sub_uns <= unsigned'(b"0000_0000") - 1; -- works + sub_sgn <= signed'(b"0000_0000") - 1; -- fails +end architecture beh; diff --git a/testsuite/synth/issue1265/testsuite.sh b/testsuite/synth/issue1265/testsuite.sh new file mode 100755 index 000000000..30f40648a --- /dev/null +++ b/testsuite/synth/issue1265/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +synth_analyze issue +clean + +echo "Test successful" |