aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue1624/buggy.vhdl16
-rwxr-xr-xtestsuite/gna/issue1624/testsuite.sh10
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/gna/issue1624/buggy.vhdl b/testsuite/gna/issue1624/buggy.vhdl
new file mode 100644
index 000000000..86a050f30
--- /dev/null
+++ b/testsuite/gna/issue1624/buggy.vhdl
@@ -0,0 +1,16 @@
+entity buggy is
+begin
+end entity buggy;
+
+architecture a of buggy is
+begin
+
+p: process
+ variable v: real;
+begin
+ -- Remove the next line and GHDL does not crash
+ v := real((now / (1 ns)) * 1.0e-9);
+ wait;
+end process;
+
+end architecture a;
diff --git a/testsuite/gna/issue1624/testsuite.sh b/testsuite/gna/issue1624/testsuite.sh
new file mode 100755
index 000000000..11caa7c58
--- /dev/null
+++ b/testsuite/gna/issue1624/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze buggy.vhdl
+elab_simulate buggy
+
+clean
+
+echo "Test successful"