diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-09-26 09:12:54 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-09-26 09:12:54 +0200 |
commit | 91c054e4cce6aa8d4fc53d3d02970a752a9d2987 (patch) | |
tree | 5d69ec13fe928eb955b5b05b34e5ca4bc075fa49 | |
parent | 8cb1e16ceb5ee655fc214f1ef8a7abbe807ba4b3 (diff) | |
download | ghdl-91c054e4cce6aa8d4fc53d3d02970a752a9d2987.tar.gz ghdl-91c054e4cce6aa8d4fc53d3d02970a752a9d2987.tar.bz2 ghdl-91c054e4cce6aa8d4fc53d3d02970a752a9d2987.zip |
testsuite/synth: add a case for #1475
-rw-r--r-- | testsuite/synth/issue1475/e.vhdl | 11 | ||||
-rw-r--r-- | testsuite/synth/issue1475/e1.vhdl | 12 | ||||
-rw-r--r-- | testsuite/synth/issue1475/e2.vhdl | 15 | ||||
-rwxr-xr-x | testsuite/synth/issue1475/testsuite.sh | 10 |
4 files changed, 48 insertions, 0 deletions
diff --git a/testsuite/synth/issue1475/e.vhdl b/testsuite/synth/issue1475/e.vhdl new file mode 100644 index 000000000..e4e6497af --- /dev/null +++ b/testsuite/synth/issue1475/e.vhdl @@ -0,0 +1,11 @@ +library ieee; +use ieee.numeric_std.all; + +entity e is +end entity; + +architecture a of e is + signal s : unsigned(31 downto 0); +begin + assert s = -3; +end architecture; diff --git a/testsuite/synth/issue1475/e1.vhdl b/testsuite/synth/issue1475/e1.vhdl new file mode 100644 index 000000000..c1523bf4f --- /dev/null +++ b/testsuite/synth/issue1475/e1.vhdl @@ -0,0 +1,12 @@ +library ieee; +use ieee.numeric_std.all; +use ieee.std_logic_1164.all; + +entity e1 is +end entity; + +architecture a of e1 is + signal s : unsigned(31 downto 0) := (others => '0'); +begin + assert s = -3; +end architecture; diff --git a/testsuite/synth/issue1475/e2.vhdl b/testsuite/synth/issue1475/e2.vhdl new file mode 100644 index 000000000..88b83c94d --- /dev/null +++ b/testsuite/synth/issue1475/e2.vhdl @@ -0,0 +1,15 @@ +entity e2 is +end; + +architecture behav of e2 is + type my_type is (lit1, lit2); + + function "+" (l : my_type; r : natural) return my_type is + begin + return lit2; + end "+"; + + signal s : my_type := lit1; +begin + assert s + (-1) = lit2; +end behav; diff --git a/testsuite/synth/issue1475/testsuite.sh b/testsuite/synth/issue1475/testsuite.sh new file mode 100755 index 000000000..495223cad --- /dev/null +++ b/testsuite/synth/issue1475/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +for t in e2 e1 e; do + synth_failure $t +done +clean + +echo "Test successful" |