aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-06-30 06:58:42 +0200
committerTristan Gingold <tgingold@free.fr>2021-06-30 06:58:42 +0200
commitafae1a4ab13485d3e5d5624ca9231bc5da0ff867 (patch)
tree8c35d443f87967100dbfb58cdc64fc2d57a25bcc
parentf33ab7adaf25c78fa88beac25df4f0d596b9d94c (diff)
downloadghdl-afae1a4ab13485d3e5d5624ca9231bc5da0ff867.tar.gz
ghdl-afae1a4ab13485d3e5d5624ca9231bc5da0ff867.tar.bz2
ghdl-afae1a4ab13485d3e5d5624ca9231bc5da0ff867.zip
testsuite/gna: add a test for #1810
-rw-r--r--testsuite/gna/issue1810/repro.vhdl8
-rwxr-xr-xtestsuite/gna/issue1810/testsuite.sh13
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/gna/issue1810/repro.vhdl b/testsuite/gna/issue1810/repro.vhdl
new file mode 100644
index 000000000..9fa6e8412
--- /dev/null
+++ b/testsuite/gna/issue1810/repro.vhdl
@@ -0,0 +1,8 @@
+entity repro is
+end;
+
+architecture behav of repro is
+ constant t1: time := 10 ns mod 3 ns;
+begin
+ assert t1 = 1 ns severity failure;
+end;
diff --git a/testsuite/gna/issue1810/testsuite.sh b/testsuite/gna/issue1810/testsuite.sh
new file mode 100755
index 000000000..e2f34ef98
--- /dev/null
+++ b/testsuite/gna/issue1810/testsuite.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure repro.vhdl
+
+export GHDL_STD_FLAGS=--std=08
+analyze repro.vhdl
+elab_simulate repro
+
+clean
+
+echo "Test successful"