From fff29e971150f24456b0f0407ae0dba773d31299 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 5 Aug 2018 16:25:24 +0200 Subject: Add testcase for #618 --- testsuite/gna/issue618/e.vhdl | 7 +++++++ testsuite/gna/issue618/e1.vhdl | 8 ++++++++ testsuite/gna/issue618/testsuite.sh | 13 +++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 testsuite/gna/issue618/e.vhdl create mode 100644 testsuite/gna/issue618/e1.vhdl create mode 100755 testsuite/gna/issue618/testsuite.sh (limited to 'testsuite') 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" -- cgit v1.2.3