aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue618/e.vhdl7
-rw-r--r--testsuite/gna/issue618/e1.vhdl8
-rwxr-xr-xtestsuite/gna/issue618/testsuite.sh13
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"