diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-08-05 16:25:24 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-08-05 16:25:24 +0200 |
commit | fff29e971150f24456b0f0407ae0dba773d31299 (patch) | |
tree | d15b61d283f4c169566889ec6c55bc06f79e5357 | |
parent | ac549b427388776c0287ba5444b2bddd6e04e0b7 (diff) | |
download | ghdl-fff29e971150f24456b0f0407ae0dba773d31299.tar.gz ghdl-fff29e971150f24456b0f0407ae0dba773d31299.tar.bz2 ghdl-fff29e971150f24456b0f0407ae0dba773d31299.zip |
Add testcase for #618
-rw-r--r-- | testsuite/gna/issue618/e.vhdl | 7 | ||||
-rw-r--r-- | testsuite/gna/issue618/e1.vhdl | 8 | ||||
-rwxr-xr-x | testsuite/gna/issue618/testsuite.sh | 13 |
3 files changed, 28 insertions, 0 deletions
diff --git a/testsuite/gna/issue618/e.vhdl b/testsuite/gna/issue618/e.vhdl new file mode 100644 index 000000000..7297d5121 --- /dev/null +++ b/testsuite/gna/issue618/e.vhdl @@ -0,0 +1,7 @@ +entity e is end entity; +architecture a of e is + type t is range 0 to 1; + constant c :t := 7 - 6; +begin + assert c = 3 report "c /= 3" severity note; +end architecture; diff --git a/testsuite/gna/issue618/e1.vhdl b/testsuite/gna/issue618/e1.vhdl new file mode 100644 index 000000000..592835515 --- /dev/null +++ b/testsuite/gna/issue618/e1.vhdl @@ -0,0 +1,8 @@ +entity e1 is end entity; +architecture a of e1 is + type t is range 0 to 1; + constant c :t := 7 - 6; +begin + assert c = 3 report "c /= 3" severity note; + assert c = t(3) report "c /= 3" severity note; +end architecture; diff --git a/testsuite/gna/issue618/testsuite.sh b/testsuite/gna/issue618/testsuite.sh new file mode 100755 index 000000000..409d73b8c --- /dev/null +++ b/testsuite/gna/issue618/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze e.vhdl +elab_simulate e +analyze e1.vhdl +elab_simulate_failure e1 + +clean + +echo "Test successful" |