aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-01-22 12:13:16 +0100
committerTristan Gingold <tgingold@free.fr>2018-01-25 06:07:11 +0100
commita22f41e442f1d82f7b18460f16844d5ce083d372 (patch)
treeeea529499e84b246def5d65e0416099b79319c56
parent7ef79a53a8f3cbb972d3ac7b8b9ab7754f201001 (diff)
downloadghdl-a22f41e442f1d82f7b18460f16844d5ce083d372.tar.gz
ghdl-a22f41e442f1d82f7b18460f16844d5ce083d372.tar.bz2
ghdl-a22f41e442f1d82f7b18460f16844d5ce083d372.zip
Add testcase for #521
-rw-r--r--testsuite/gna/issue521/pkg.vhdl3
-rwxr-xr-xtestsuite/gna/issue521/testsuite.sh16
-rw-r--r--testsuite/gna/issue521/tieee.vhdl10
-rw-r--r--testsuite/gna/issue521/tieee2.vhdl5
4 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/gna/issue521/pkg.vhdl b/testsuite/gna/issue521/pkg.vhdl
new file mode 100644
index 000000000..ad1b62ba7
--- /dev/null
+++ b/testsuite/gna/issue521/pkg.vhdl
@@ -0,0 +1,3 @@
+package pkg is
+ constant cst : natural := 5;
+end pkg;
diff --git a/testsuite/gna/issue521/testsuite.sh b/testsuite/gna/issue521/testsuite.sh
new file mode 100755
index 000000000..f5b4bfe61
--- /dev/null
+++ b/testsuite/gna/issue521/testsuite.sh
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+# Check that it is possible to override ieee library
+analyze --work=ieee pkg.vhdl
+
+analyze tieee.vhdl
+elab_simulate tieee
+
+analyze_failure tieee2.vhdl
+
+clean
+clean ieee
+
+echo "Test successful"
diff --git a/testsuite/gna/issue521/tieee.vhdl b/testsuite/gna/issue521/tieee.vhdl
new file mode 100644
index 000000000..4bbc48460
--- /dev/null
+++ b/testsuite/gna/issue521/tieee.vhdl
@@ -0,0 +1,10 @@
+library ieee;
+use ieee.pkg.all;
+
+entity tieee is
+end;
+
+architecture behav of tieee is
+begin
+ assert cst = 5 severity failure;
+end behav;
diff --git a/testsuite/gna/issue521/tieee2.vhdl b/testsuite/gna/issue521/tieee2.vhdl
new file mode 100644
index 000000000..abdd17d43
--- /dev/null
+++ b/testsuite/gna/issue521/tieee2.vhdl
@@ -0,0 +1,5 @@
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity tieee2 is
+end;