aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-03-16 21:39:32 +0100
committerTristan Gingold <tgingold@free.fr>2017-03-16 21:39:32 +0100
commitacd655405d0e4420c8d17afe2c6a7f2c4bec8225 (patch)
treec6eab6dc80e1e6a7170b0abf447517822acebb97 /testsuite
parent18149662b330de3d6085bddf168f4f513fd4f8fa (diff)
downloadghdl-acd655405d0e4420c8d17afe2c6a7f2c4bec8225.tar.gz
ghdl-acd655405d0e4420c8d17afe2c6a7f2c4bec8225.tar.bz2
ghdl-acd655405d0e4420c8d17afe2c6a7f2c4bec8225.zip
Reproducer for #321
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue321/repro.vhdl26
-rwxr-xr-xtestsuite/gna/issue321/testsuite.sh10
2 files changed, 36 insertions, 0 deletions
diff --git a/testsuite/gna/issue321/repro.vhdl b/testsuite/gna/issue321/repro.vhdl
new file mode 100644
index 000000000..a73b43623
--- /dev/null
+++ b/testsuite/gna/issue321/repro.vhdl
@@ -0,0 +1,26 @@
+package pkg is
+ function f return natural;
+end pkg;
+
+package body pkg is
+ constant c : natural := 5;
+
+ function f return natural is
+ begin
+ report "read " & c'path_name severity note;
+ return c;
+ end;
+end pkg;
+
+entity repro is
+end;
+
+architecture behav of repro is
+begin
+ process
+ begin
+ assert work.pkg.f >= 2;
+ wait;
+ end process;
+end behav;
+
diff --git a/testsuite/gna/issue321/testsuite.sh b/testsuite/gna/issue321/testsuite.sh
new file mode 100755
index 000000000..7da7af956
--- /dev/null
+++ b/testsuite/gna/issue321/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze repro.vhdl
+elab_simulate repro
+
+clean
+
+echo "Test successful"