diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-10-06 20:44:10 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-10-06 20:44:10 +0200 |
commit | 0921cd5b27d22deb2735a2668c0dd015c64d9513 (patch) | |
tree | 3dc3f83f1773b9f296e370bad990f41583a8269f | |
parent | 3ed10bea5275a9a0f8d6cc6c13b90bc02cb42d75 (diff) | |
download | ghdl-0921cd5b27d22deb2735a2668c0dd015c64d9513.tar.gz ghdl-0921cd5b27d22deb2735a2668c0dd015c64d9513.tar.bz2 ghdl-0921cd5b27d22deb2735a2668c0dd015c64d9513.zip |
Add reproducer for #26
-rw-r--r-- | testsuite/gna/issue26/repro.vhdl | 25 | ||||
-rwxr-xr-x | testsuite/gna/issue26/testsuite.sh | 15 |
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" |