aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue26/repro.vhdl25
-rwxr-xr-xtestsuite/gna/issue26/testsuite.sh15
2 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/issue26/repro.vhdl b/testsuite/gna/issue26/repro.vhdl
new file mode 100644
index 000000000..f6a878094
--- /dev/null
+++ b/testsuite/gna/issue26/repro.vhdl
@@ -0,0 +1,25 @@
+entity Time_travel is
+end Time_travel;
+
+architecture Behavioral of Time_travel is
+
+constant start_time : time := 10 ms;
+constant stop_time : time := 5 ms;
+
+procedure delay(t : time) is
+begin
+ wait for t;
+end delay;
+
+begin
+
+McFly : process is
+begin
+ wait for start_time;
+ report " Started " severity NOTE;
+ delay(stop_time - start_time);
+-- wait for stop_time - start_time;
+ report " Stopped " severity NOTE;
+ wait;
+end process;
+end Behavioral;
diff --git a/testsuite/gna/issue26/testsuite.sh b/testsuite/gna/issue26/testsuite.sh
new file mode 100755
index 000000000..467230316
--- /dev/null
+++ b/testsuite/gna/issue26/testsuite.sh
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze repro.vhdl
+elab_simulate_failure time_travel > sim.err
+if ! grep -q '11' sim.err; then
+ echo "missing line number"
+ exit 1
+fi
+
+clean
+rm -f sim.err
+
+echo "Test successful"