diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-12-24 18:11:31 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-12-24 18:11:31 +0100 |
commit | 38c38e7f30dbe7f9e51992f399d80c344c72130c (patch) | |
tree | 2904bc75fd639129e24fe85871fc974d670eda1a /testsuite/gna/issue1057 | |
parent | 2274e49872de5df0eedfc1a2db5bd0156ad161e9 (diff) | |
download | ghdl-38c38e7f30dbe7f9e51992f399d80c344c72130c.tar.gz ghdl-38c38e7f30dbe7f9e51992f399d80c344c72130c.tar.bz2 ghdl-38c38e7f30dbe7f9e51992f399d80c344c72130c.zip |
testsuite/gna: add a test for #1057
Diffstat (limited to 'testsuite/gna/issue1057')
-rw-r--r-- | testsuite/gna/issue1057/pkg.vhdl | 5 | ||||
-rw-r--r-- | testsuite/gna/issue1057/pkg2.vhdl | 7 | ||||
-rwxr-xr-x | testsuite/gna/issue1057/testsuite.sh | 10 |
3 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/gna/issue1057/pkg.vhdl b/testsuite/gna/issue1057/pkg.vhdl new file mode 100644 index 000000000..31db3963b --- /dev/null +++ b/testsuite/gna/issue1057/pkg.vhdl @@ -0,0 +1,5 @@ +package pkg is + type enum_t is (alpha, beta); + alias alias_t is enum_t; +end package; + diff --git a/testsuite/gna/issue1057/pkg2.vhdl b/testsuite/gna/issue1057/pkg2.vhdl new file mode 100644 index 000000000..3ca41a563 --- /dev/null +++ b/testsuite/gna/issue1057/pkg2.vhdl @@ -0,0 +1,7 @@ +-- Enum literals should be made implicitly visible here +use work.pkg.alias_t; + +package pkg2 is + -- Fails with no declaration for "alpha" + constant c : alias_t := alpha; +end package; diff --git a/testsuite/gna/issue1057/testsuite.sh b/testsuite/gna/issue1057/testsuite.sh new file mode 100755 index 000000000..6eeba4f7e --- /dev/null +++ b/testsuite/gna/issue1057/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze pkg.vhdl pkg2.vhdl + +clean + +echo "Test successful" |